Airmar.py syntax error

39 views
Skip to first unread message

Thomas Google konto

unread,
May 2, 2025, 2:02:35 PM5/2/25
to weewx-user
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

p q

unread,
May 2, 2025, 2:08:04 PM5/2/25
to prim...@gmail.com, weewx-user

I'm guessing that stretch uses python 2 and bullseye uses python 3. See if there's a python 3 version of the driver.


--
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 weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/cc76e65d-7368-4d4a-97c9-5cd047daaf1fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages