Problem with urllib3 and API Twitter

2

Save money on duty

I'm using this font for twitter API

link

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: can not import name ReadTimeoutError

Has anyone ever used api and knows how to solve it?

    
asked by anonymous 24.03.2016 / 21:36

1 answer

3

The problem is that your requests package is in an old version. You must upgrade . These packages use urllib3 . At 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 .

    
13.10.2016 / 21:24