The problem is in /home/weewx/skins/External/index.html.tmpl
There is a comparision (greater than) between two values, where one of them 
(the left) is None.

something like:

#if $val > $other

Where $val is None and $other an integer. Where is the template from, who 
made it? 

When it happens occasionally, probably some obs_type has no reading and the 
template doesn't take this into account. This might or might not be 
unexpected, for the windDir, for instance, it is perfectly correct to have 
None as the value, when the windSpeed is 0.
Invisible Man schrieb am Montag, 21. August 2023 um 08:29:08 UTC+2:

> Hello,
> I occasionally have an error in my Weewx logs that indicate that, at some 
> point, I receive for a given value the value None where I was expected an 
> int. Because of this error, cheetahgenerator fails to produce the correct 
> HTML file.
>
> ```
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: 
> Evaluation of template /home/weewx/skins/External/index.html.tmpl failed 
> with exception '<class 'TypeError'>'
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: **** 
> Ignoring template /home/weewx/skins/External/index.html.tmpl
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: **** 
> Reason: '>' not supported between instances of 'NoneType' and 'int'
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: **** 
>  Traceback (most recent call last):
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: ****   
>  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: ****     
>  unicode_string = compiled_template.respond()
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: ****   
>  File "_home_weewx_skins_External_index_html_tmpl.py", line 317, in respond
> Aug 21 00:02:29 vegan weewx[20951] ERROR weewx.cheetahgenerator: **** 
>  TypeError: '>' not supported between instances of 'NoneType' and 'int'
> Aug 21 00:06:22 vegan weewx[20951] ERROR weewx.cheetahgenerator: 
> Evaluation of template /home/weewx/skins/External/index.html.tmpl failed 
> with exception '<class 'TypeError'>'
> Aug 21 00:06:22 vegan weewx[20951] ERROR weewx.cheetahgenerator: **** 
> Ignoring template /home/weewx/skins/External/index.html.tmpl
> ```
>
> The problem might be in my template - something like a value which is not 
> protected by a call to "has_data". Ideally, I would like to know at which 
> line it fails in the template, or which data is the cause. Is there a way 
> to do that ?
>
> I already have `debug =1` in my config.
> I am running Weewx 4.10.2 on a Raspberry Pi.
>
> Thanks,
> Axelle 
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bb6275c6-ac0b-44bb-b6dd-5270cb55de7cn%40googlegroups.com.

Reply via email to