Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 13th, 2004, 01:33 PM
roscoe04 roscoe04 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 10 roscoe04 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
xmlrpc problem

I'm a newbie to python and I'm trying to implement a small xml-rpc server client pair. I've downloaded some sample code off of the net which works fine on its own, however when I put parts of it into my existing code, it gives me an error which I can't seem to figure out.....This is what it spits back at me

Unhandled exception in thread started by <function serveClient at 0x008FA330>
Traceback (most recent call last):
File "C:\Program Files\Trust2\python\hearingAid.py", line 71, in serveClient
if mod.execute(params,cursor,conn):
File "C:\Program Files\Trust2\python\filesharing\query.py", line 87, in execute
print server.dump_params(params)
File "C:\PYTHON23\lib\xmlrpclib.py", line 1029, in __call__
return self.__send(self.__name, args)
File "C:\PYTHON23\lib\xmlrpclib.py", line 1316, in __request
verbose=self.__verbose
File "C:\PYTHON23\lib\xmlrpclib.py", line 1080, in request
return self._parse_response(h.getfile(), sock)
File "C:\PYTHON23\lib\xmlrpclib.py", line 1219, in _parse_response
return u.close()
File "C:\PYTHON23\lib\xmlrpclib.py", line 742, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "exceptions.AttributeError:'dict' object has no attribute 'encode'">

if anyone has any suggestions, they would be greatly appreciated. Thanks

Reply With Quote
  #2  
Old May 13th, 2004, 02:04 PM
roscoe04 roscoe04 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 10 roscoe04 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok, I fixed it.....I know what I did to fix it, but I don't know why it fixed it. If anyone knows why this would have fixed it, please let me know.....

Here's what I did:

originally my MyRequestHandler class only had two methods in it, call and dump_params. This is when I was getting the error.

When I copied the other methods that I found in an online example (which included dump_methodcall, test, and dump_response) it started working.....

It would seem to me that what I was trying to do before was dependent on one of these new methods, but I can't see how or why.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > xmlrpc problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway