← Back to team overview

openstack team mailing list archive

[OpenStack][Swift] Cannot perform multiple requests with Python API

 

Hello all,

I'm having an issue when using the Python API for swift [1]. I am unable to
do two sequential operations. The first operation works and the second
ceases to work. Is this expected, or is this a bug?

I'm using Ubuntu 12.04 with the Folsom Packages.

Example output (Python Interpreter):
>>> import swiftclient
>>> swiftclient.get_container([URL],[TOKEN],'test')
({'content-length': '174', 'x-container-object-count': '1',
'accept-ranges': 'bytes', 'x-container-bytes-used': '200', 'x-timestamp':
'1357299184.84634', 'date': 'Mon, 07 Jan 2013 18:25:41 GMT',
'content-type': 'application/json; charset=utf-8'}, [{'bytes': 200,
'last_modified': '2013-01-07T18:07:17.289060', 'hash':
'fbaf48ec981a5eecdb57b929fdd426e8', 'name': 'test_object', 'content_type':
'application/octet-stream'}])
>>> swiftclient.get_container([URL],[TOKEN],'test')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 487,
in get_container
    resp = conn.getresponse()
  File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py",
line 103, in getresponse
    logging.debug(_("HTTP PERF: %(time).5f seconds to %(method)s "
TypeError: 'tuple' object is not callable

Regards,

Leander

[1] https://github.com/openstack/python-swiftclient

Follow ups