Problem with urllib3 and Twitter API

Asked

Viewed 87 times

2

Save Coderos on duty

I’m using this source 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 Import: cannot import name Readtimeouterror

Someone has already used the api and knows how to solve?

1 answer

3

The problem is that your package requests 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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.