On Friday, June 12, 2020 at 4:01:38 PM UTC+10, gjr80 wrote:
>
> Hi,
>
> Can’t see why syslog is not thread safe, before v4 the WeeWX report engine
> ran in a separate thread and all logging was done through syslog and I
> don’t recall there ever being a syslog/thread issue. Likewise a number of
> WeeWX v3 and earlier 3rd party drivers/services use threading and syslog
> without issue.
>
> Gary
Hi Gary,
Thanks. I've found the cause of the thread exit. Sometimes a garbled
string gets received by the radio comms and it is a problem to parse.
WLST: parsing ST<EA><CA><EA>%bwater_level 1 0x0 water_level 2 0x0135
Traceback (most recent call last):
File "/usr/share/weewx/user/water_level.py", line 191, in run
for p in re.split("[,]",line.decode("utf-8")):
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xea in position 2:
invalid continuation byte
WLST: Exit inner while.
(WLST stands for Water Level Server Thread).
I'm not yet sure why my code didn't catch this exception when I was using
syslog yet, but at least I now have a stable system.
It is lovely to watch the water volume in our tanks increasing when a
shower of rain comes over.
Cheers,
James.
--
You received this message because you are subscribed to the Google Groups
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-development/c2be3ed0-1cb9-49b5-956d-282f2b57bef9o%40googlegroups.com.