|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > xmlrpc problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|