boto / boto

For the latest version of boto, see https://github.com/boto/boto3 -- Python interface to Amazon Web Services

Home Page:http://docs.pythonboto.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: sequence item 0: expected string, int found when connecting to sqs

ohadperry opened this issue · comments

boto==2.34.0
I'm trying to connect to an sqs queue.

from boto import sqs
conn = sqs.connect_to_region(region, aws_access_key_id=access_key_id, aws_secret_access_key=secret_access_key)
self.__queue = conn.get_queue(queue_name)

getting TypeError: sequence item 0: expected string, int

The issue was caused due to an http request coding the headers Content-length: 0 instead of Content-length: '0' (int vs string).
I upgraded to boto==2.49.0 and the issue was solved.