API Limit

18 views
Skip to first unread message

Frédéric Roland

unread,
Aug 30, 2009, 7:58:31 PM8/30/09
to twytho...@googlegroups.com
Hello,

I modified my destroyStatus based script to make a pause of 3 seconds
between all call to the twitter api.
the rate limit status show 136 150 but my script fail after the first
destroyStatus.


Traceback (most recent call last):
File "search_results.py", line 11, in <module>
twitter.destroyStatus(int(machin['id']))
File "/Users/roland/Development/twitter/twython/twython.py", line
494, in destroyStatus
raise TwythonError("destroyStatus() failed with a %s error code."
% `e.code`, e.code)
File "/Users/roland/Development/twitter/twython/twython.py", line
40, in __init__
raise APILimit(msg)
twython.APILimit: 'destroyStatus() failed with a 400 error code.'


Frédéric

Frédéric Roland

unread,
Aug 30, 2009, 8:22:23 PM8/30/09
to twytho...@googlegroups.com
Hello,

it seems that every call to destroyStatus return a 400 error.
I placed my call to destroyStatus in a try/except and ignoring the
false error.
Also it seems that call to destroyStatus are not counted in the rate
limit.
I think that only the calls to getUserTimeline are counted then
destroyStatus are "free" but return a 400 error.

Frédéric


Le 31-août-09 à 01:58, Frédéric Roland a écrit :

Ryan McGrath

unread,
Aug 31, 2009, 2:19:26 AM8/31/09
to Twython Talk
Hey,

The issues with destroyStatus() returning a consistent 400 definitely
seems to be on Twitter's end. Their API spec states that if the
deletion was successful, they should be returning some JSON value (in
our case, that is), which they're not. The status deletes just fine,
but... yeah, not sure what the deal is with Twitter at the moment.

That said, destroyStatus() has been fixed in Master. Thanks for
catching this error, guys (this is also in reply to the other thread,
just trying to merge conversations).

Commit: http://github.com/ryanmcgrath/twython/commit/80bc6f9fd0908b6b3f660da57e122ed900de9f61

Lemme know if there's anything else you guys find like this.

- Ryan

Chris Babcock

unread,
Aug 31, 2009, 1:02:10 PM8/31/09
to twytho...@googlegroups.com
On Mon, 31 Aug 2009 01:58:31 +0200
Frédéric Roland <frederi...@creativeconvergence.info> wrote:

> I modified my destroyStatus based script to make a pause of 3
> seconds between all call to the twitter api.
> the rate limit status show 136 150 but my script fail after the
> first destroyStatus.
>

...


> twython.APILimit: 'destroyStatus() failed with a 400 error code.'

I think that this is may be what is a known issue with the Twitter API
right now. Try accessing the destroyed Status after a 400 message to
see if the call succeeded despite the error response.

White listing is said to normally take 1 week but has been reported at
2 weeks since the DDoS attacks at the beginning of the month.

Chris Babcock

signature.asc
Reply all
Reply to author
Forward
0 new messages