Python TweetStream Access Denied

I get this exception from TweetStream 1.1.1, "exception.code == 404: uthenticationError (" Access denied ")" It worked last week, and now it is not. I tried different usernames and passwords. I can log in to Twitter with information about my account. I even uninstalled and reinstalled the module. what gives? Thanks for the help!

I'm trying to run this ...

import tweetstream stream = tweetstream.SampleStream("MY_USERNAME", "MY_PASSWORD") for tweet in stream: print tweet 

The error looks something like this:

 Traceback (most recent call last): File "<pyshell#28>", line 1, in <module> for tweet in stream: File "C:\Python27\lib\site-packages\tweetstream-1.1.1-py2.7.egg\tweetstream\streamclasses.py", line 165, in __iter__ self._init_conn() File "C:\Python27\lib\site-packages\tweetstream-1.1.1-py2.7.egg\tweetstream\streamclasses.py", line 103, in _init_conn raise AuthenticationError("Access denied") AuthenticationError: Access denied 
+4
source share
2 answers

Twitter has released the next version of the API ( 1.1 ). And tweetstream does not yet support it. See the relevant issue on tweetstream project tracking twitter.

+4
source

Here was the same issue, and I was not able to get the fixed version mentioned in the tracker on the project issue (related to @alecxe) to work.

Twitter provides a list of libraries that should work with the new API at https://dev.twitter.com/docs/twitter-libraries

It lists many, including several for Python.

0
source

Source: https://habr.com/ru/post/1486113/


All Articles