RalfZim / venus.dbus-fronius-smartmeter

A service for Venus OS, reading smart meter data from a Fronius system and making the values available on dbus.
MIT License
51 stars 30 forks source link

Syntax Error vedbus.py ? #22

Closed Magnus8513 closed 1 year ago

Magnus8513 commented 1 year ago

Hi, installed as per your instructions but the service keeps crashing with the following error:

`root@raspberrypi2:/data# svstat /service/dbus-fronius-smartmeter /service/dbus-fronius-smartmeter: up (pid 13551) 1 seconds root@raspberrypi2:/data# python /data/dbus-fronius-smartmeter/dbus-fronius-smartmeter.py

Traceback (most recent call last): File "/data/dbus-fronius-smartmeter/dbus-fronius-smartmeter.py", line 25, in from vedbus import VeDbusService File "/data/dbus-fronius-smartmeter/vedbus.py", line 8 <!DOCTYPE html> ^ SyntaxError: invalid syntax`

Can you help?

RalfZim commented 1 year ago

This sounds like the vedbus.py library is not compatible to your version of Python or your vedbus.py file is corrupt.

Looking at https://github.com/victronenergy/velib_python/blob/master/vedbus.py at line 8, it should contain "import weakref". I am confused, that your error message basically refers to an empty line at line 8:

File "/data/dbus-fronius-smartmeter/vedbus.py", line 8

^
SyntaxError: invalid syntax`

@Magnus8513 : Can you investigate in that direction?

Magnus8513 commented 1 year ago

Hi Ralf, thank you for your quick reply. I managed to get it to work with a fork on your repo therefore did not fully investigate what went wrong here. Therfore you may close this.

sveba commented 1 year ago

@Magnus8513 which VenusOS version do you use? I'm afraid to update to 3.0.1 because of possible problems And which fork did you use?