My first post here and I'm confused already. Must be something to do with my age! If I'm doing something wrong just dig a hole and bury me.
This is advice on a fix rather than a call for help.
Ok, I'm setting up weewx v4.2 on a RPi4 as a new installation. I had been running v3.8 on the computer but it wasn't live, but worked fine. Weewx 4.2 appears to be working fine (with simulator) but my first extension, cwxn 0.4 bombed out with an error ...
$ sudo tail /var/log/syslog
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** self.loadServices(config_dict)
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 153, in loadServices
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** obj = weeutil.weeutil.get_object(svc)(self, config_dict)
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** mod = __import__(module)
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** File "/usr/share/weewx/user/cwxn.py", line 94
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** except Exception, e:
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** ^
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** SyntaxError: invalid syntax
Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__: **** Exiting.
My online search for "except Exception, e:" revealed a change in syntax for Python v3.x and, after changing line 94 in cwxn.py to read "except Exception as e:" the extension now works as intended.
Thought mwall might like to know.
BTW, cwxn formats humidity to 3 digits whereas the aprs spec calls for just 2. If cwxn is used for aprs the last digit is truncated making 20% (020) humidity appear as 2% (02). For my use I modified cwxn.py - problem solved.
Ray