Trading Strategies With News And Tweets

from data_modules.sentiment_analysis_quantra import get_twitter_tokens



Whenever I enter this code into my local machine, it would say:

ModuleNotFoundError: No module named 'sentiment_analysis_quantra'

Could anyone help me with this issue please? Thank you. 

 

Hi Sean,



For the code to run properly, you need to unzip the compressed folder at the end of the course.

There is a folder called " data_modules" which has the file "sentiment_analysis_quantra.py". Your error message indicates that the file can not be found. That means the code is unable to locate the said file.



Before you use the "sentiment_analysis_quantra.py" will need to enter your relevant API keys in the file.



Hope this helps!

Yes, I've already unzipped the folder and edited the file "sentiment_analysis_quantra.py". However, when I key in: from data_modules.sentiment_analysis_quantra import get_twitter_tokens, I will still get a ModuleNotFound error. Do you know what's the reason for this?

 

Hi Sean,



Maybe your current working directory is different from what is in the unzipped folder. Are you running the jupyter notebook from the unzipped folder location or are you using it from a different location?

 

Hi Sean,



You need to install the package "vaderSentiment".

The correct version of all package you need, are in the ReadMe pdf in the zipped downloadable folder.



You can run this command in your jupyter notebook to fix the above error.

!pip install vaderSentiment==3.2.1

 

Alright, I have already managed to solve the above problem. Thanks for your feedback!