stamatelou / twitter_sentiment_analysis

Twitter real-time sentiment analysis using Spark Structured Streaming and Python
18 stars 22 forks source link

cannot import name 'StreamListener' from 'tweepy.streaming' #1

Open lakshay2k opened 2 years ago

lakshay2k commented 2 years ago

While forming the twitter connection, there is an import error of StreamListener. Although the code is same. This is the error:

cannot import name 'StreamListener' from 'tweepy.streaming' (/local_disk0/.ephemeral_nfs/envs/pythonEnv-d91ce06f-2724-4270-a14b-f268b31bcae9/lib/python3.8/site-packages/tweepy/streaming.py)

Anshumank399 commented 2 years ago

The tweepy library has upgraded. Use tweepy.Stream instead of StreamListener. For more information use: Stack Overflow

chandru-master commented 2 years ago

stream listerner upgraded with tweepy version 4 for that u write the code line tweepy.listener