Request reached rate limit - resumes in negative seconds
Closed this issue · 2 comments
hauselin commented
Hi, for some reason, recently, when I reach the request rate limit, I see messages that tell me it will resume in negative seconds. I haven't changed my code at all, and it used to work fine previously, so I'm not sure what's changed. Appreciate any help anyone can provide. Thanks!
Message
Request reached Rate Limit: resume in -830 seconds
sleep length must be non-negative
The options I'm using:
options={
"handle_rate_limit": True,
"retry_max": 3,
"retry_delay": 10000,
"retry_on_status": [404, 500, 503],
"retry_on_timeouts": True,
"timeout": (1.0, 8.0),
}
smaeda-ks commented
I may suspect your system clock was off for some reason:
https://github.com/twitterdev/twitter-python-ads-sdk/blob/master/twitter_ads/http.py#L131-L136
hauselin commented
Thanks, @smaeda-ks! That's likely the issue.