← Back to team overview

openstack team mailing list archive

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

 

I am not sure why it does that (works fine for me), can you try with the
git version to see if you can reproduce ?

Thanks,
Chmouel.


On Mon, Jan 7, 2013 at 7:31 PM, Leander Bessa Beernaert <leanderbb@xxxxxxxxx
> wrote:

> 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
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References