I'm guessing that stretch uses python 2 and bullseye uses python 3. See if there's a python 3 version of the driver.
On Fri, May 2, 2025, 11:02 AM Thomas Google konto <[email protected]> wrote: > Hi, > I've been running weewx under Raspberry Stretch for a few years. Weather > station Airmar 150WX and driver airmar.py. Since Stretch is a bit old, I've > installed weewx 1.5.0 on a Raspberry Bullseye. But I get a syntax error on > line 157 in Airmar.py > > weewxd > Using configuration file /etc/weewx/weewx.conf > Traceback (most recent call last): > File "/usr/share/weewx/weewxd.py", line 226, in <module> > main() > File "/usr/share/weewx/weewxd.py", line 121, in main > engine = weewx.engine.StdEngine(config_dict) > File "/usr/share/weewx/weewx/engine.py", line 80, in __init__ > self.setupStation(config_dict) > File "/usr/share/weewx/weewx/engine.py", line 104, in setupStation > __import__(driver) > File "/usr/share/weewx/weewx/drivers/airmar.py", line 157 > except (serial.serialutil.SerialException, weewx.WeeWxIOError), e: > > ^ > SyntaxError: invalid syntax > > I can read the data from the Airmar station via Minicom > > All tips are welcome > > Thomas > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/weewx-user/cc76e65d-7368-4d4a-97c9-5cd047daaf1fn%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/cc76e65d-7368-4d4a-97c9-5cd047daaf1fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/CAA1SM23Y7eTmjM5gZ-FS2jrT0NBHEnum-%2BD%3D8tnpZbYUVVT3ig%40mail.gmail.com.
