4

I keep getting this exception from TweetStream 1.1.1, "exception.code == 404:uthenticationError("Access denied")" It worked last week and now it doesn't. I have tried different usernames and passwords. I can log into twitter with my account information. I even deleted and reinstalled the module. what gives? Thanks for the help!

I try running this...

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

The error actually looks 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
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
AdrianBoeh
  • 176
  • 2
  • 3
  • 14

2 Answers2

4

Twitter released the next version of API (1.1). And tweetstream doesn't support it yet. See relevant issue on tweetstream project issue tracker.

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
  • Is it still possible to use username/password authentication against Twitter. Is it not all OAuth now, hence the Access denied? – jakc Jun 18 '13 at 02:56
0

Had the same problem here, and I could not get the patched version mentioned on the project issue tracker (linked by @alecxe) to work either.

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

It lists many, including several for Python.

TextGeek
  • 1,196
  • 11
  • 23