-
Notifications
You must be signed in to change notification settings - Fork 1k
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
'encoding' is an invalid keyword argument for this function #47
Comments
We migrated to Python 3 a little while ago, so there may be backwards compatibility issues with Python 2. For your issue -- in Python 2, the open() function takes no encoding argument (the third argument is the buffering option instead). The fix is to add the following line near the top of the vaderSentiment.py file: If you are able to make this work, let me know, and I'll update the master branch so that others will benefit from this backwards compatibility hack. |
Hello, thank you for the fast reply. Adding Thank you! |
@cjhutto I've added that but it still comes up with this: File "/usr/local/lib/python2.7/dist-packages/vaderSentiment/vaderSentiment.py", line 212, in init |
You saved my day! Including the line in my script did it! Thanks 👍 |
Hello,
I am trying to use vaderSentiment with Python 2.7.12 but it's giving me this error, line: https://github.com/cjhutto/vaderSentiment/blob/master/vaderSentiment/vaderSentiment.py#L212
Does vaderSentiment support python 2?
Thank you.
The text was updated successfully, but these errors were encountered: