-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax Warnings after upgrading to Ubuntu 24.04 #40
Comments
Accidentally noticed the same on Fedora as well as my Mac on Sonoma 14.5. Think it means that it was expecting the ':' in the regex to be escaped. The [\d] seems odd - maybe it doesn't like it in brackets anymore. Everything seemed to be working correctly regardless of the warnings so I put it on the back burner. Didn't notice the signal gain issue. I'll try to get to it soon. |
Decided to look at it now, and am sorry I did. |
Ok... updated nrsc5-dui.py to fix the warnings and automatic gain display (admittedly a coding brainfart). That said, some of the warnings involved the weather and traffic displays. Unfortunately it appears the rf amp connected to the antenna on the roof has died and can no longer reliably receive any of the stations that provide this info. So I haven't been able to test to see if it works correctly. If you're able to test it for me I'd greatly appreciate it. |
All the warnings are now gone. Everything works, including the weather and traffics maps with the exception of the rf gain. It still reads 0.00db |
Hmm... It's possible that's actually the best that Automatic gain chosen. It may do that for really good signals. Does it stay that way for every station you tune to? Try a distant station and see if it changes. Before, it wasn't detecting that status line because I inadvertently had it look for the time at the start of it, presumably (in my mind) to be consistent with the other recompile lines. There is no timecode in that status line, therefore the amount was always defaulting to zero. I removed that part of it and shows for me now. |
I tried 4 different stations and they all report 0.00dB. Under settings I also manually entered a known working gain for several stations and instead of 0.0dB showing on the bottom, the gain display disappears completely. I realize that's probably not a bug, but by design, as it doesn't make much sense to display the gain if you hard code a known value for it under nrsc5-dui's settings. This isn't a huge deal for me so don't put a lot of time into troubleshooting this as I'm very happy with nrsc5-dui as it is. |
Actually, I did find an issue with the gain display... another coding brainfart where for some stupid reason I was reading it from the status and dividing it by ten.🤷🏻♂️ One of those things at my age you start asking 'what the hell was I thinking'. Regardless, Just pushed another fix for that. In your case, it may be possible that something was borking anything less than ten, and displaying it as zero. The omission when it's not automatic was intended, but I started questioning why I did that as well. It's one of those things that you don't think about when you're doing it but a few years later seems like a better idea... Like, if there's a station location (coordinates) and I'm already parsing it, why aren't I displaying it somewhere? Or, if I really want to add more bloat: Show it's location on a mini-map with it's relative distance to your listening location... |
I think I may have found the problem. Using the latest build of NRSC5, the gain isn't being echoed to the console when tuning to a frequency. Here's some output when running from the command line and the word "Gain" isn't reported anywhere in the stream. I'm assuming that NRSC5-DUI gets the gain value from this output instead of from an API call. $ nrsc5 93.3 0 Found Rafael Micro R820T tuner |
Hmmm. The build from Clayton's origin master using the default debug level is reporting it. |
Here's the output:
|
I just cloned and built the binary from his repo and this is what I get. Still no gain value reported. And my version number: $ nrsc5 -v $ nrsc5 93.3 0 |
Lol... good thing bash history is better than my memory. I built it with level 1... |
That was it! Thanks for the fix! |
No prob. I'm off to take my Prevagen... 😂 |
I just upgraded from Ubuntu 22 to 24.04. I've updated all my python dependencies and nrsc5-dui runs, but with the following syntax warnings. Everything appears to function properly in spite of the warnings with the exception of the db signal gain, it remains at 0.0 all the time.
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:286: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Station name: (.)$"), # 0 match station name
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:287: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Station location: (-?[\d]+.[\d]+) (-?[\d]+.[\d]+), ([\d]+)m$"), # 1 match station location
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:288: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Slogan: (.)$"), # 2 match station slogan
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:289: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Audio bit rate: (.) kbps$"), # 3 match audio bit rate
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:290: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Title: (.)$"), # 4 match title
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:291: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Artist: (.)$"), # 5 match artist
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:292: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Album: (.)$"), # 6 match album
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:293: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} LOT file: port=([\d]+) lot=([\d]+) name=(..(?:jpg|jpeg|png|txt)) size=([\d]+) mime=([\w]+) .$"), # 7 match file (album art, maps, weather info)
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:294: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} MER: (-?[\d]+.[\d]+) dB (lower), (-?[\d]+.[\d]+) dB (upper)$"), # 8 match MER
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:295: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} BER: (0.[\d]+), avg: (0.[\d]+), min: (0.[\d]+), max: (0.[\d]+)$"), # 9 match BER
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:296: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Best gain: (.) dB,.$"), # 10 match gain
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:297: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} SIG Service: type=(.) number=(.) name=(.)$"), # 11 match stream
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:298: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} .Data component:. id=([\d]+). port=([\d]+).* service_data_type=([\d]+) .$"), # 12 match port (and data_service_type)
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:299: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} XHDR: (.) ([0-9A-Fa-f]{8}) (.)$"), # 13 match xhdr tag
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:300: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Unique file identifier: PPC;07; ([\S]+).$"), # 14 match unique file id
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:301: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Genre: (.)$"), # 15 match genre
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:302: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Message: (.)$"), # 16 match message
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:303: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Alert: (.)$"), # 17 match alert
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:304: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} .Audio component:. id=([\d]+). port=([\d]+).* type=([\d]+) .$"), # 18 match port (and type)
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:305: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Synchronized$"), # 19 synchronized
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:306: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Lost synchronization$"), # 20 lost synch
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:307: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Lost device$"), # 21 lost device
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:308: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Open device failed.$"), # 22 No device
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:309: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Stream data: port=([\d]+). mime=([\w]+) size=([\d]+)$"), # 23 Navteq/HERE stream info
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:310: SyntaxWarning: invalid escape sequence ':'
re.compile("^[0-9:]{8,8} Packet data: port=([\d]+).* mime=([\w]+) size=([\d]+)$") # 24 Navteq/HERE packet info
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:1110: SyntaxWarning: invalid escape sequence '\d'
r = re.compile("^([\d]+).$")
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:1228: SyntaxWarning: invalid escape sequence '\d'
r = re.compile("^[\d]+TMT.([1-3])([1-3])([\d]{4})([\d]{2})([\d]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{4})..$") # match file name
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:1295: SyntaxWarning: invalid escape sequence '\d'
r = re.compile("^[\d]+DWRO(.).*([\d]{4})([\d]{2})([\d]{2})([\d]{2})([\d]{2})([0-9A-Fa-f]+)..$") # match file name
/home/steve/Desktop/nrsc5-dui/./nrsc5-dui.py:1379: SyntaxWarning: invalid escape sequence '('
r = re.compile("^Coordinates=.((-?[\d]+.[\d]+),(-?[\d]+.[\d]+)).((-?[\d]+.[\d]+),(-?[\d]+.[\d]+)).$")
Using Pillow v10.2.0
The text was updated successfully, but these errors were encountered: