curl-and-python

pycurl.POSTFIELDS in xmlrpc_curl.py

From: Andreas Köhler <andi5.py_at_gmx.net>
Date: Thu, 22 Feb 2007 02:25:51 +0100

Hi,

i am unable to successfully run xmlrpc_curl.py from
http://pycurl.cvs.sourceforge.net/*checkout*/pycurl/pycurl/examples/xmlrpc_curl.py?revision=1.12&content-type=text%2Fplain

>>> python xmlrpc_curl.py
<ServerProxy for betty.userland.com/RPC2>
Traceback (most recent call last):
  File "xmlrpc_curl.py", line 59, in <module>
    print server.examples.getStateName(41)
  File "/usr/lib/python2.5/xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.5/xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "xmlrpc_curl.py", line 38, in request
    self.c.setopt(pycurl.POSTFIELDS, request_body)
pycurl.error: (2, '')

>>> dpkg -l libcurl3 python-pycurl python2.5
ii libcurl3 7.15.5-1ubuntu1
ii python-pycurl 7.15.5-1ubuntu1
ii python2.5 2.5-5ubuntu7

I also compiled the latest libcurl release and pycurl HEAD to no avail.
IIRC, there was some issue in src/pycurl.c : do_curl_setopt : case
CURLOPT_POSTFIELDS, where PyString_AsStringAndSize cleared `option' for
whatever reason.

-- andi5

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2007-02-22