smar000 / evoGateway

Python script for listening in and responding to evohome heating control radio messages
46 stars 17 forks source link

Error on startup #39

Closed mozster closed 2 years ago

mozster commented 2 years ago

Hi

I'm getting the following error output when starting the script:

pi@emonpi:~/dev/evoGateway $ python3 evogateway.py
Traceback (most recent call last):
  File "evogateway.py", line 24, in <module>
    from ramses_rf import Gateway, GracefulExit
  File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/__init__.py", line 24, in <module>
    from .devices import Device, create_device
  File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/devices.py", line 20, in <module>
    from .entities import Entity, discovery_filter
  File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/entities.py", line 11, in <module>
    from .protocol import I_, RP, RQ, W_, __dev_mode__  # noqa: F401, isort: skip
  File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/protocol/__init__.py", line 8, in <module>
    from .logger import set_logger_timesource, set_pkt_logging
  File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/protocol/logger.py", line 214
    if file_name := kwargs.get(LOG_FILE_NAME, 0):
                  ^
SyntaxError: invalid syntax

Any suggestions on what might be going wrong?

Thanks

mozster commented 2 years ago

ah, it looks like I need Python 3.8+ for the walrus operator (https://docs.python.org/3/whatsnew/3.8.html) and raspbian is currently shipping with 3.7... I'm updating now and will close once it's working

mozster commented 2 years ago

working now... :)

smar000 commented 2 years ago

Glad you figured it out! :)

Maikel-K commented 2 years ago

So what exactly did you do to solve it? I had the same issue on my Rpi and used a link to upgrade python 2.7.x to 3.9.7 which worked but now the script still isn't working

Running Python -V gives me 3.9.7 and running python3 -V gives me 3.7.3.

Didnt had too much time yesterday trying to figure out a solution so I'm curious to what you did to get it too work.

mozster commented 2 years ago

I had a few things to sort out, didn't keep any notes but happy to provide more details if needed, outline steps were:

Other than the above, it's probably worth checking your device is sending data over serial port (minicom -D /dev/ttyACM0 in my case) and maybe worth trying the ramses_rf cli to make sure the problem isn't lower down the stack?