Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > debugging xmlrpc servers

Thread Tools

debugging xmlrpc servers

alan dot ezust at gmail dot com
Posts: n/a
Problems with XMLRPC

I have an xmlrpc server with a method called results() which returns an

I've been able to use this function without problems when I had only
one client talking to one server. I have recently introduced a P2P
aspect to this process and now I have servers calling each other's
methods all the time.

I am running into some bugs which I am unable to debug.

I am using

As per the instructions, I called rpdb.set_trace() right before calling

Then I ran the server, and ran the client. At a certain point, the
asks the server for the results(), and instead of getting a proper
result, I
get this exception:

/usr/lib/python2.3/ in close(self=<xmlrpclib.Unmarshaller
743 raise ResponseError()
744 if self._type == "fault":
745 raise Fault(**self._stack[0])
746 return tuple(self._stack)
global Fault = <class xmlrpclib.Fault>, self = <xmlrpclib.Unmarshaller
instance>, self._stack = [{'faultCode': 1, 'faultString':
'exceptions.ValueError:too many values to unpack'}]

args = ()
faultCode = 1
faultString = 'exceptions.ValueError:too many values to unpack'

I thought that my rpdb problems were related to the fact that I was
multiply-inheriting from SocketServer.ThreadingMixIn (which I believe
a new thread for each incoming request), so I changed this:
class QueryServer(SocketServer.ThreadingMixIn,
to this:
class QueryServer(SimpleXMLRPCServer.SimpleXMLRPCServer) :

I am still unable to set a breakpoint in the results() method. I'd
like to trace through it so I can figure out why I am getting this
exception. Any ideas?

Reply With Quote
Diez B. Roggisch
Posts: n/a
I have difficulties understanding your probelem - is your own method giving
you trouble (and the 'exceptions.ValueError:too many values to unpack')
error or is it the remote debugger? Or do you simply not understand the
error message itself.

The error itself is raised in cases like this:

a,b,c = (1,2,3,4)

Now to see where that sort of statement fails, it would help if you'd give
us the actual code for your result-method.


Diez B. Roggisch
Reply With Quote
alan dot ezust at gmail dot com
Posts: n/a
Understandable - i had difficulties understanding my problem too!

I don't really understand why I got that error message before - I
believe it was due to the fact that some other exception was being
raised inside results().

Anyway, the solution was to call rpdb.set_trace() inside the actual
method which was being called by xmlrpc, and setting the breakpoint to
be the statement following that line (rather than the function itself).
cheers --alan

Reply With Quote

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing XMLRPC::Servers Alex Young Ruby 2 05-17-2007 11:42 AM
Implementing dhcp servers and dns servers =?Utf-8?B?ZG91Z2hib3kzMQ==?= MCSE 20 06-23-2006 11:11 PM
33.6% of servers sold in Q4 2005 were Windows servers Au79 Computer Support 0 03-08-2006 07:11 AM
Python xmlrpc servers? ted holden Python 9 12-01-2004 08:45 PM
Re: xmlrpc, httplib and SSL (HTTP 1.1 XMLRPC client) Etienne Posthumus Python 1 04-01-2004 05:13 PM