From: Peter Reuterås Date: Sun, 9 Oct 2011 10:35:01 +0000 (+0200) Subject: Fix for newer version of httplib X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7b311d64791a55363d21bbe0a44a49a4a7c61293;p=tweepy.git Fix for newer version of httplib httplib in python 2.7 requires that the lenght parameter is a string and not an int. --- diff --git a/tweepy/api.py b/tweepy/api.py index dafb739..8f36e32 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -747,7 +747,7 @@ class API(object): # build headers headers = { 'Content-Type': 'multipart/form-data; boundary=Tw3ePy', - 'Content-Length': len(body) + 'Content-Length': str(len(body)) } return headers, body