osome-iu / botometer-python

A Python API for Botometer by OSoMe
https://botometer.osome.iu.edu
MIT License
371 stars 59 forks source link

Basic quota is reached too early #58

Closed javier-pg closed 3 years ago

javier-pg commented 3 years ago

I have noticed that the quota of the basic plan is reached too early, without overpassing the number of 500 requests. For example, with a total of 6 requests (seen on RapidAPI), the limit error is raised (on code and also in the notification of RapidAPI interface). I have also employed a delay on requests, so it seems not to be a problem of Twitter rate limit...

PD: Version 4 of Botometer is installed and executed properly, and the successful requests are working fine

yang3kc commented 3 years ago

This looks like a problem at the RapidAPI side, they are handling the rate limit for us. You can reach out to them through support@rapidapi.com

yang3kc commented 3 years ago

One possible cause is that hte BASIC plan has a 1request/1second rate limit too. It's possible to encounter errors if you are querying accounts too fast. You might want to force your script to sleep 1s between two consecutive queries.

javier-pg commented 3 years ago

One possible cause is that hte BASIC plan has a 1request/1second rate limit too. It's possible to encounter errors if you are querying accounts too fast. You might want to force your script to sleep 1s between two consecutive queries.

I think this is not the case, I have employed a delay of 1.1s between requests.

I will contact RapidAPI support and comment here the answer.

Thank you!

javier-pg commented 3 years ago

Hi again!

After several days discussing with RapidAPI support, here we have the final answer:

this looks to be a different issue where our quota "service" doesn't keep up with refreshing if such short timespan is used. This is a different issue to the one we've been investigating in this thread. I should have discovered it much faster and offer you to extend the delay so I'm sorry for lost time here. It is something our team is aware of so I'll notify them to push this item on the backlog list.

Therefore, there are currently problems in the BASIC plan with the theoretical limit of one request per second. The solution is to extend the delay between requests to a bigger count of seconds.

yang3kc commented 3 years ago

Good to hear! So now we just have to wait?

javier-pg commented 3 years ago

Good to hear! So now we just have to wait?

yes, that seems...

brunorafe commented 3 years ago

Could you guys please update this thread as soon as they fix the problem? I am having the same issue. Thanks.

filmenczer commented 3 years ago

@brunorafe for now the workaround seems to be to wait more than a second between consecutive requests, perhaps a few seconds?

brunorafe commented 3 years ago

@brunorafe for now the workaround seems to be to wait more than a second between consecutive requests, perhaps a few seconds?

Yes. I did that and it seems it is working now. I am just wondering when the rapidapi will fix this. Thank you!