uclatommy/tweetfeels

UnboundLocalError: local variable 's' referenced before assignment

Closed this issue · 3 comments

In tweetfeels.py I always get this error on the

return s

There is data (I can print it and there are many tweets with the subjects i'm looking at) and sentiments is a generator returned, but it never gives a next. What could be wrong?

Think I found the answer; you need to unzip and manually copy the vader lexicon txt file into your working directory if you are under Windows, otherwise the sentiment is always 0 and it throws those away.

I have this error in Ubuntu. Whenever I try to run trump_feels.sentiment.values I always get UnboundLocalError: local variable 's' referenced before assignment .