cjhutto / vaderSentiment

VADER Sentiment Analysis. VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media, and works well on texts from other domains.
MIT License
4.43k stars 1k forks source link

TypeError on opening lexicon #87

Closed rxng closed 5 years ago

rxng commented 5 years ago

Hi,

I installed Vader through pip (python 2.7.13), and it doesn't seem to be working.

analyzer = SentimentIntensityAnalyzer() File "/usr/local/lib/python2.7/dist-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

Am I using the wrong python version? Assumed that as installed through pip it would have retrieved the correct one?

Appreciate any advice at all.

Cheers