Problem with urllib3 and Twitter API
Save elbows on duty
I am using this font for Twitter API
Https://github.com/geduldig/TwitterAPI
When running the error examples:
File 'stream_tweets.py', line 1, in from TwitterAPI import TwitterAPI File "/usr/local/lib/python2.7/dist-packages/TwitterAPI/TwitterAPI.py", line 10, in from requests.packages.urllib3.exceptions import ReadTimeoutError, ProtocolError ImportError: cannot import name ReadTimeoutError
Has anyone already used the api and knows how to solve?
1 answers
The problem is that your requests
package is in an old version. You need to make a upgrade
. These packages use urllib3
. On the command line, run:
pip install requests --upgrade
Or, to upgrade everything the Twitter API uses, run:
pip install TwitterAPI --upgrade
Since You Are Using Python 2.7, you may need to install pip: install pip
.