-
Notifications
You must be signed in to change notification settings - Fork 58
Troubleshooting & FAQ
If you encounter the following error
ModuleNotFoundError: No module named 'tweepy.error'
it probably means you installed Tweepy v4.0.0 or above and it's not back compatible.
To fix the issue, please downgrade Tweepy to earlier versions such as v3.10.0.
If you have trouble querying more than 17,280 accounts per day with the Ultra plan, it might be because you are using the default user authentication. Please refer to https://github.com/IUNetSci/botometer-python#authentication for instruction on how to switch to app authentication.
Your script is probably named botometer.py
and it's importing itself instead of the botometer module. Give your script a different name and try again.
If you are scanning screen names from a list and storing the results, you should also have a way of handling and storing these errors.
Botometer raises this error when attempting to classify an account with no tweets in its timeline. The backend Botometer service won't return bot scores without any tweets in the timeline -- there's too little data to make a judgement.
These errors are raised when an account sets their profile to private, or if the account has been deleted or suspended.
If you are having the following error message:
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://botometer-pro.p.rapidapi.com/2/check_account.
It probably means you haven't subscribe to the Botometer-Pro API yet. Rapid API visually allows you to see your rapidAPI key without subscribing to any of the Botometer plans (from the "Endpoints" page), users can copy and paste their rapid API key into their own code attempting to utilize the botometer-python package (likely based on the "Quick Start" instructions) prior to subscribing. However, if you have not yet subscribed to any plan, you will trigger the 403 error.
The solution is to go to the Endpoints page (after creating a RapidAPI account), clicking Subscribe to Test, and then selecting whatever plan the user prefers.
Twitter's REST API limits users to 180 requests per 15-minute window; Botometer uses this rate limit as well. As with Twitter's REST API, responses from Botometer include the X-Rate-Limit-Limit
, X-Rate-Limit-Remaining
, and X-Rate-Limit-Reset
headers.
Meanwhile, we have a 1 request/second limit on the BASIC plan on RapidAPI. So you may also experiencing 429 errors by exceeding this limit. To fix it, please add a 1s delay between your requests.
If you would like Botometer access without rate limits, contact us about our commercial offerings. You must have access to Twitter data beyond the public REST API in order for increasted BoN rate limits to be useful.
9 times out of 10 this error happens because you're missing something the backend code is looking for in the request body. Make sure the following are true:
- The body of your POST request is a JSON string and not form-data
- The
content
field of the request object is an array of tweet objects, each of which contain their user objects (this is how they usually come from Twitter) - The
user_id
andscreen_name
are provided in themeta
object and they refer to the user whose timeline is being analyzed
This is often due to an issue at the ISP level. We've seen this with requests coming from certain countries; if possible, try the request with a server or proxy located in the US and see if it works.
This error happens when our web server is not forwarding requests to the Botometer service. This error most often occurs when we are pushing an update to the backend code, but sometimes happens when the service is over capacity. In either case, wait 60 seconds and try again. Updates may take up to 5 minutes to complete, so be patient if you see this error.
This seems to happen on the rare occasion that Mashape is having issues and is timing out. Not much can be done here besides retrying the request.
As discussed in an issue, this is due to an issue with your Twitter API keys (not Mashape). Check carefully for typos introduced by copy-pasting. You can troubleshoot your Twitter API connection with the Tweepy API object property: bom.twitter_api
. Try something like bom.twitter_api.verify_credentials()
.