jertel / vuegraf

Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB
MIT License
167 stars 55 forks source link

Syntax Error in vuegraf.py? #8

Closed BenPanbo closed 3 years ago

BenPanbo commented 3 years ago

Hello, I've jsut followed the instructions for vuegraf but I'm seeing a syntax error on line 36 of vuegraf.py:

pi@raspberrypi:~/vuegraf-master/src $ python vuegraf.py vuegraf.json File "vuegraf.py", line 36 print('{} | {} | {}'.format(now, level.ljust(5), msg), flush=True) ^ SyntaxError: invalid syntax

Given that this appears to be a debug statement I commented it out but that resulted in a subsequent error :

pi@raspberrypi:~/vuegraf-master/src $ python vuegraf.py vuegraf.json /usr/lib/python2.7/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) Traceback (most recent call last): File "vuegraf.py", line 10, in <module> from pyemvue import PyEmVue File "/usr/local/lib/python2.7/dist-packages/pyemvue/__init__.py", line 2, in <module> from pyemvue.pyemvue import PyEmVue File "/usr/local/lib/python2.7/dist-packages/pyemvue/pyemvue.py", line 85 raise ValueError(f'Scale of {scale} is invalid, must be 1S, 1MIN, 15MIN, or 1H.') ^ SyntaxError: invalid syntax

I apologize as I suspect I'm doing something silly. Best, Ben

jertel commented 3 years ago

It looks like you are using Python 2.7, however this project requires Python 3.

BenPanbo commented 3 years ago

I mentioned that I thought I was doing something silly, right? I'll fix that post-haste.

Best, Ben