Glen, John,

I deleted and replaced the double and single quotes in the code.  It turns 
out that single quotes threw the same error when I restarted weewx.  Here 
the log output from the restart:

DEBUG weewx.engine: Loading service user.rtgd.RealtimeGaugeData
INFO user.rtgd: version is 0.5.5
DEBUG weewx.manager: Daily summary version is 4.0
INFO user.rtgd: Unknown block specified for scroller_text
INFO user.rtgd: gauge-data.txt will not be exported.
INFO user.rtgd: '/var/www/html/weewx/steelseries/gauge-data.txt' will be 
generated. min_interval is 2 seconds
DEBUG weewx.engine: Finished loading service user.rtgd.RealtimeGaugeData
INFO __main__: Starting up weewx version 5.2.0
DEBUG weewx.engine: Station does not support reading the time
INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
INFO weewx.manager: Starting backfill of daily summaries
INFO weewx.manager: Empty database
INFO weewx.engine: Starting main packet loop.
DEBUG weewx.manager: Daily summary version is 4.0
DEBUG weewx.manager: Daily summary version is 4.0
CRITICAL user.rtgd: Unexpected exception of type <class 'KeyError'>
DEBUG user.rtgd: rtgdthread: **** Traceback (most recent call last):
DEBUG user.rtgd: rtgdthread: ****   File "/etc/weewx/bin/user/rtgd.py", 
line 1825, in run
DEBUG user.rtgd: rtgdthread: ****     
self.process_packet(_package['payload'])
DEBUG user.rtgd: rtgdthread: ****     
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
DEBUG user.rtgd: rtgdthread: ****   File "/etc/weewx/bin/user/rtgd.py", 
line 1870, in process_packet
DEBUG user.rtgd: rtgdthread: ****     _conv_packet = 
weewx.units.to_std_system(packet,
DEBUG user.rtgd: rtgdthread: ****                                           
   self.stats_unit_system)
DEBUG user.rtgd: rtgdthread: ****   File "/usr/share/weewx/weewx/units.py", 
line 1613, in to_std_system
DEBUG user.rtgd: rtgdthread: ****     _datadict_target = 
StdUnitConverters[unit_system].convertDict(datadict)
DEBUG user.rtgd: rtgdthread: ****                       
 ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
DEBUG user.rtgd: rtgdthread: **** KeyError: None
CRITICAL user.rtgd: Thread exiting. Reason: None

Thanks for staying with me on this!

On Wednesday, November 19, 2025 at 2:25:37 PM UTC-5 Glenn McKechnie wrote:

> On Thu, 20 Nov 2025 at 05:34, 'Ron Walker' via weewx-user <
> [email protected]> wrote:
>
>> John,
>>
>> I deleted the max_cache_age line and retyped it, in case there was any 
>> text I couldn't see.
>>
>> Here is the line you requested:
>> File "/etc/weewx/bin/user/rtgd.py", line 2893
>>     log.info(\u201cts: %s (%s), self.cache[obs][\u2018ts\u2019]: %s 
>> (%s), max_age: %s (%s)\u201d % (ts, ts, self.cache[obs][\u2018ts\u2019], 
>> self.cache[obs][\u2018ts\u2019], max_age, max_age))
>>              ^
>> SyntaxError: invalid character '\u201c' (U+201C)
>>
>
> That syntax error is the result of non-ascii characters in your log.info 
> string. Specifically - smart quotes. They are showing up as \u201c and 
> \201d instead.
>
> Where you see *" or **”*  ie :- 'double quotes' delete them and replace 
> them with the plain* " *character from your keyboard. Use a plain text 
> editor to do it and it will have no choice but to insert the correct 
> character. Use nano, vim or whatever is your favourite editor
>
> There is a subtle difference in their appearance and while they appear the 
> same, they are most definitely not.
>
>
> Cheers
>  Glenn (VK3GLN)
>
> Various WeeWx addons at
> https://github.com/glennmckechnie 
>

-- 
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/449edf27-cfd2-4050-8700-a368880e9e6fn%40googlegroups.com.

Reply via email to