-
Notifications
You must be signed in to change notification settings - Fork 996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'encoding' is an invalid keyword argument for this function #50
Comments
try adding this to your list of imports to make it backward compatible for Python 2.7: from io import open |
Thank you for your quick response. Did that. Worked like a charm. |
ERROR:
I tried running the 3 line code inside a Jupyter notebook with python 3.6 and outside of jupyter in a terminal within python 2.7 and produced the same error. I used Ubuntu OS. Maybe put 'from io import open' in the vaderSentiment.py file? I would need instructions to produce complied bytecode to overwrite the existing one..... I've never done that before. Any suggestions or solutions? |
sudo nano /home/kap/anaconda3/envs/py36/lib/python2.7/site-packages/vaderSentiment/vaderSentiment.py put from io import open in this file not on yours |
I am facing this issue as well.
This gets rid of the message
But then now the error is showing for
|
Im getting this error while compiling SentimentIntensityAnalyzer()
ErrorLog:
venv/local/lib/python2.7/site-packages/vaderSentiment/vaderSentiment.py", line 212, in init
with open(lexicon_full_filepath, encoding='utf-8') as f:
TypeError: 'encoding' is an invalid keyword argument for this function
The text was updated successfully, but these errors were encountered: