Invalid Syntax
Opened this issue · 7 comments
File "/usr/local/lib/python3.5/dist-packages/tweetfeels-0.4.0-py3.5.egg/tweetfeels/tweetdata.py", line 146
df = df.groupby(pd.TimeGrouper(freq=f'{int(binsize/second)}S')).size()
^
SyntaxError: invalid syntax
Do you know what can happen? Thanks
After update python3.6 the issue continue:
/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetdata.py:146: FutureWarning: pd.TimeGrouper is deprecated and will be removed; Please use pd.Grouper(freq=...)
df = df.groupby(pd.TimeGrouper(freq=f'{int(binsize/second)}S')).size()
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "pruebaSentimientos.py", line 15, in print_feels
print(f'[{time.ctime()}] Sentiment Score: {data_feels.sentiment.value}')
File "/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetfeels.py", line 133, in sentiment
return s
UnboundLocalError: local variable 's' referenced before assignment
can anybody help me?
t.start()
/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetdata.py:146: FutureWarning: pd.TimeGrouper is deprecated and will be removed; Please use pd.Grouper(freq=...)
df = df.groupby(pd.TimeGrouper(freq=f'{int(binsize/second)}S')).size()
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "", line 4, in print_feels
File "/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetfeels.py", line 133, in sentiment
return s
UnboundLocalError: local variable 's' referenced before assignment
data_feels.stop()
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetfeels.py", line 152, in self_update
self.sentiment
File "/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetfeels.py", line 133, in sentiment
return s
UnboundLocalError: local variable 's' referenced before assignment
Same Error Here
Had this same error. This can be fixed by editing "/usr/local/lib/python3.6/dist-packages/tweetfeels/tweetdata.py" and changing TimeGrouper to Grouper.
I changed TimeGrouper to Grouper and I still receive the same error "UnboundLocalError: local variable 's' referenced before assignment"
Any ideas? :(
any solution?
I just shipped a new version on pypi which should fix this error. To upgrade:
pip uninstall tweepy
pip install tweetfeels --upgrade
Note that it is important to uninstall tweepy as shown by the first line.
Hopefully tweepy will release a new version soon and we can simplify the install complications caused by the upstream bug. If your issues are resolved, I would appreciate a shout back here to let us know so we can get this issue closed.