[Catalog-sig] pypi xmlrpc interface
Stephen Thorne
stephen at thorne.id.au
Tue Mar 3 00:21:44 CET 2009
G'day,
I get a traceback from the server when I try to list releases of a
package using the xmlrpc interface.
The specific example used on the wiki reproduced here does this:
>>> import xmlrpclib
>>> server = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
>>> server.package_urls('roundup', '1.1.2')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.5/xmlrpclib.py", line 1150, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.5/xmlrpclib.py", line 1440, in __request
verbose=self.__verbose
File "/usr/lib64/python2.5/xmlrpclib.py", line 1204, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib64/python2.5/xmlrpclib.py", line 1343, in _parse_response
return u.close()
File "/usr/lib64/python2.5/xmlrpclib.py", line 790, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: 'Traceback (most recent call last):\n ...'>
>>>
That traceback-from-the-server-on-a-stick-in-a-string looks like this when
rendered nicely:
Traceback (most recent call last):
File "/data/pypi/src/pypi/rpc.py", line 23, in handle_request
xml = xmlrpclib.dumps((response,), methodresponse=True, allow_none=True)
File "/usr/lib/python2.5/xmlrpclib.py", line 1080, in dumps
data = m.dumps(params)
File "/usr/lib/python2.5/xmlrpclib.py", line 623, in dumps
dump(v, write)
File "/usr/lib/python2.5/xmlrpclib.py", line 635, in __dump
f(self, value, write)
File "/usr/lib/python2.5/xmlrpclib.py", line 695, in dump_array
dump(v, write)
File "/usr/lib/python2.5/xmlrpclib.py", line 635, in __dump
f(self, value, write)
File "/usr/lib/python2.5/xmlrpclib.py", line 716, in dump_struct
dump(v, write)
File "/usr/lib/python2.5/xmlrpclib.py", line 633, in __dump
raise TypeError, "cannot marshal %s objects" % type(value)
TypeError: cannot marshal <type 'mx.DateTime.DateTime'> objects
--
Regards,
Stephen Thorne
Development Engineer
NetBox Blue - 1300 737 060
Find out why NetBox Blue's solutions are growing in popularity in
today's economic environment: http://netboxblue.com/news/creditcrunch
Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)
More information about the Catalog-SIG
mailing list