TwythonRateLimitError.retry_after is always None. #317
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#317
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
According to the Twython documentation (which, by the way, does not match the version on PyPI), "The amount of seconds to retry your request in will be appended to" a
TwythonRateLimitError; however, I have never observed this. I think it is because of changes in Twitter API 1.1 (see HTTP Headers and Response Codes) that contrast with version 1. I'm not sure if this is the only place aTwythonRateLimitErroris raised, but on line 178 of api.py, the incorrect header ('retry-after' instead of 'X-Rate-Limit-Reset') is retrieved and passed toTwythonRateLimitError. This causesTwythonRateLimitError.retry_afterto always beNone.The script below demonstrates the issue (assuming the API keys are set in the environment and currently being rate-limited, which I have a script to do if you want).
Twython is great! I am currently using it to build a retriever that returns geotagged Tweets in GeoJSON format. Just out of curiosity, when is the next release planned for PyPI?
I've been trying to get around to find some time to merge some PRs. Tomorrow I have a full day of work that I need to get done. But I'll try to set the first hour aside to fixing, testing and pushing up a new version of Twython