You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
I was getting rate-limit errors, even though I'd specified a rate_limit_per_minute arg of 1, so I looked into the RateLimitCache class. I see that the new() method is actually never getting called, so this class cannot be performing as expected. I added the following two lines to the bottom of the _impose_rate_limit method, and it seems to (temporarily) fix the problem.
if hasattr(self, '_rlcache'):
self._rlcache.new()
However, this is not even the proper solution. The rate-limit will still kick in, since the API is actually limited to 1 request/sec (as opposed to 60 requests per 60 seconds). This implementation will send a few requests as fast as possible, then error out. The correct implementation will limit the number of requests per second, rather than per minute.