If anybody is intending to use my script (link) 
<https://github.com/vinceskahan/weewx/tree/main/weewx-rtldavis> to install 
the rtldavis driver over a current version of the raspi using debian trixie 
as the base, you will see Syntax Warning(s) during installation of the 
extension.

This seems to be due to the newer version of python in trixie.  See 
(stackoverflow) 
<https://stackoverflow.com/questions/77531208/python-3-12-syntaxwarning-invalid-escape-sequence-on-triple-quoted-string-d>
 for 
the gory details.

The last answer in that thread shows how to deal with it if you're so 
inclined, given that a future python will someday break rather than throw a 
warning. In short, patch the offending lines in rtldavis.py slightly.

The warnings indicate which line items to patch.  Basically change 
re.compile( to re.compile(r on the offending lines.  Regular expressions 
and particularly python's implementation of them make my head spin, so I 
can't speak re: whether this actually changes behavior other than stopping 
the python interpreter from barking at you.

The offending warnings are below just as a FYI...

/home/pi/weewx-data/bin/user/rtldavis.py:513: SyntaxWarning: invalid escape 
sequence '\d'
  IDENTIFIER = re.compile("^\d\d:\d\d:\d\d.[\d]{6} 
[0-9A-F][0-7][0-9A-F]{14}")
/home/pi/weewx-data/bin/user/rtldavis.py:514: SyntaxWarning: invalid escape 
sequence '\d'
  PATTERN = 
re.compile('([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})
 
([\d]+) ([\d]+) ([\d]+) ([\d]+)')
/home/pi/weewx-data/bin/user/rtldavis.py:543: SyntaxWarning: invalid escape 
sequence '\d'
  PATTERNv13 = re.compile('ChannelIdx:([\d]+) ChannelFreq:([\d]+) 
FreqError:([\d-]+) Transmitter:([\d]+)')
/home/pi/weewx-data/bin/user/rtldavis.py:544: SyntaxWarning: invalid escape 
sequence '\d'
  PATTERNv12 = re.compile('ChannelIdx:([\d]+) ChannelFreq:([\d]+) 
FreqError:([\d-]+)')


-- 
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/d43f3a94-4db6-4dbe-aadd-acbc602678f7n%40googlegroups.com.

Reply via email to