ImportError: cannot import name 'StreamListener' from 'tweepy.streaming'
Error: ImportError: cannot import name 'StreamListener' from 'tweepy.streaming'
RCA:
This issue is due to change in the library code. Tweepy v4, you don't need to use StreamListener
Solution:
#from tweepy.streaming import StreamListener #OLD CODE
import tweepy # NEW CODE
#class TweetListener (StreamListener): #OLD CODE
class TweetListener (tweepy.Stream): # NEW CODE
Its working fine for me now.
No comments:
Write commentsPlease do not enter spam links