AelaHuntress
AelaHuntress

Reputation: 61

Python - Solving command line error for Tweepy

I am trying to use Tweepy to stream Tweets from a developer API. I want to convert this into an SQLite database file.

However, I am getting an unusual error that links to the Tweepy libraries on my computer. I am using Python 3.6.7 (if that might have something to do with it).

Please let me know if you require more information.

In Windows 10 command line:

Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\CONFIDENTIAL\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner self.run() File "C:\Users\CONFIDENTIAL\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "C:\Users\CONFIDENTIAL\AppData\Local\Programs\Python\Python36\lib\site-packages\tweepy\streaming.py", line 293, in _run self.listener.on_exception(exception) AttributeError: 'int' object has no attribute 'on_exception'

Upvotes: 1

Views: 203

Answers (1)

Harmon758
Harmon758

Reputation: 5157

When initializing tweepy.Stream, you're passing an integer for the listener parameter, rather than an instance of tweepy.StreamListener. See the Streaming with Tweepy section of Tweepy's documentation.

Upvotes: 0

Related Questions