Tweepy: Invalid arguments at function call (tweepy.Stream())

Ricardo Mansilla rick.mansilla at gmail.com
Mon Oct 31 12:18:24 EDT 2011


Hi i'm trying to fetch realtime data from twitter using tweepy.Stream().
So I have tried the following...
After successfully authenticate using oauth:

auth = tweepy.OAuthHandler(...) (it works fine, i have my access_token.key
and secret)

i did:
streaming_api = tweepy.streaming.Stream(auth, CustomStreamListener(),
timeout='90')
and:
streaming_api = tweepy.streaming.Stream(auth, CustomStreamListener(),
timeout='90')

none of this works, it keeps giving me the same error:

Traceback (most recent call last):
File "", line 1, in
streaming_api = tweepy.streaming.Stream(auth, CustomStreamListener(),
timeout='60')
TypeError: *init*() takes at least 4 arguments (4 given)

then i have searched for the parameters of the function:

tweedy.streaming.Stream(login,password,Listener(),...etc)
but i thought this login and pass was the authentication method using in
the basic authentication not in the oauth case.
Now i'm really confused, a little help please?

pd: As you can see, i'm trying to get realtime data from twitter (and make
some further NLP with it), i have chose tweepy because the
dev.twitter.compage recommended it, but if you have any other
suggestion for doing this,
it will be welcomed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111031/114146c1/attachment.html>


More information about the Python-list mailing list