ImportError: cannot import name 'StreamListener' from 'tweepy.streaming'

 



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 comments

Please do not enter spam links

Meet US

Services

More Services