Just before base.py calls httplib on line 433, it sets this header.
base.py: 426:
headers.update({'Content-Length': len(data)})
Why that worked before, I don't know, but it shouldn't have and now doesn't.
S
On Jul 18, 2010, at 12:25 AM, Tom Davis wrote:
> Judging by the exception, I guess they stopped implicitly casting variables
> used in format strings? That's not something I remember reading about in
> What's New, but it makes sense in that context. What header we're sending
> that isn't a string is another question.
>
> Of course, I reserve the right to be totally off-base here ;)
>
> On Jul 17, 2010, at 9:31 PM, "sstei...@idc" <[email protected]>
> wrote:
>
>> With Python 2.7, Rackspace driver
>>
>> Works fine under 2.6.5, fails on Python 2.7
>>
>> Traceback:
>> images = self.list_images()
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/apache_libcloud-0.4.0-py2.7.egg/libcloud/drivers/rackspace.py",
>> line 193, in list_images
>> return self._to_images(self.connection.request('/images/detail').object)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/apache_libcloud-0.4.0-py2.7.egg/libcloud/drivers/rackspace.py",
>> line 147, in request
>> method=method, headers=headers
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/apache_libcloud-0.4.0-py2.7.egg/libcloud/base.py",
>> line 433, in request
>> headers=headers)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
>> line 946, in request
>> self._send_request(method, url, body, headers)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
>> line 986, in _send_request
>> self.putheader(hdr, value)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
>> line 924, in putheader
>> str = '%s: %s' % (header, '\r\n\t'.join(values))
>> TypeError: sequence item 0: expected string, int found
>>
>> Haven't explored too much, I'm busy on a time-critical deployment, working
>> on switching to 2.7 to run deployment scripts, fell down right here...
>>
>> Anyone have any ideas?
>>
>> Thanks,
>>
>> Stephen F. Steiner
>> Integrated Development Corporation
>> [email protected]
>> www.integrateddevcorp.com
>> (603)433-1232
>>
>>
>>
Stephen F. Steiner
Integrated Development Corporation
[email protected]
www.integrateddevcorp.com
(603)433-1232