tweepy.error.TweepError: Twitter error response: status code = 411

841 views
Skip to first unread message

Mohammad N. Khatib

unread,
Dec 29, 2009, 7:47:01 AM12/29/09
to tweepy
Whenever I try to update_status I get the following error

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.6-universal/egg/tweepy/binder.py", line
167, in _call
tweepy.error.TweepError: Twitter error response: status code = 411


Any ideas?

Dharmesh Shah

unread,
Oct 28, 2012, 12:51:13 AM10/28/12
to twe...@googlegroups.com
I ran into this problem earlier today.  The work-around is to pass a headers parameter as shown in the sample code below:

Result = API.update_status (status = TweetText, in_reply_to_status_id = ReplyToTweetID, headers={'content-length': 0})

Basically, you need the content-length header.   Passing this additional parameter fixed the problem for me (I was getting the 411 error too).

Hope that helps.

-Dharmesh

On Sat, Oct 27, 2012 at 11:00 PM, <facundo...@gmail.com> wrote:

I'm getting the same, and error code is not listed in https://dev.twitter.com/docs/error-codes-responses

Josh Roesslein

unread,
Oct 29, 2012, 9:13:30 PM10/29/12
to twe...@googlegroups.com
I believe Twitter is looking into this issue. I guess their servers suddenly started being "strict" on HTTP 1.1.
I see someone has contributed a pull request to work around this issue. I'll look into merging this to master
and pushing a release.

Josh Roesslein

unread,
Nov 5, 2012, 11:41:46 PM11/5/12
to twe...@googlegroups.com
The issue seems to be resolved now. Not seeing any 411 errors when doing POST requests (ex: update_status()).
Reply all
Reply to author
Forward
0 new messages