These kinds of errors can be very difficult to find, and the Cheetah
diagnostics don't help much. They refer to the line of the compiled
template, which you don't have access to because it is a temporary file.

It is possible to compile the template separately, then look at the output,
but that's usually not worth it.

I suspect that somewhere you have an expression similar to "$day.outTemp <
5", where what you want is "$day.outTemp.raw < 5". I've used "$day" and
"outTemp" in this example, but it could be any time period and any
observation type. Look through the Sofaskin week.html.tmpl file carefully
for such expressions.

If worse comes to worse, you can also split the file in half, try it, and
see if you get the error. Keep splitting the offending half until you
narrow it down to a handful of lines.





On Mon, May 16, 2022 at 6:56 AM [email protected] <[email protected]>
wrote:

> I recently moved my Weewx to a Pi3 (from Pi2) and a new sdcard after
> issues on the old one.
> OS is dietpi (Debian 11)
> The reinstall went mostly fine but the cheetahgenerator is having problems
> processing the weekly tmpl page of my site and I'm having difficulty
> finding the offending line.
> The error is :
>
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: Evaluation of template
> /etc/weewx/skins/Sofaskin/week.html.tmpl failed with exception '<class
> 'TypeError'>'
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: **** Ignoring template
> /etc/weewx/skins/Sofaskin/week.html.tmpl
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: **** Reason: '<' not supported between instances of
> 'AggTypeBinder' and 'int'
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: ****  Traceback (most recent call last):
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: ****    File
> "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: ****      unicode_string =
> compiled_template.respond()
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: ****    File
> "cheetah__etc_weewx_skins_Sofaskin_week_html_tmpl_1652707218_3933926_51403.py",
> line 611, in respond
> May 16 14:50:17 WeatherStation python3[347]: weewx[347] ERROR
> weewx.cheetahgenerator: ****  TypeError: '<' not supported between
> instances of 'AggTypeBinder' and 'int'
>
> The week.html.tmpl file it references isnt 611 lines long so i dont know
> where to look.
> The (temporary?) py file it references  is somewhere i cannot find -.
> "cheetah__etc_weewx_skins_Sofaskin_week_html_tmpl_1652707218_3933926_51403.py"
>
> This was working previously on the old install using python 2.
> Has anyone any suggestion on how to tackle this?
>
>
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/weewx-user/74db6b27-898b-4ca3-8ef6-45d9ac9d2830n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/74db6b27-898b-4ca3-8ef6-45d9ac9d2830n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAApXV_rpx1vQjJU7%3Dkv971B-%2BZwwA7%2BJhw-8QeGiieng%40mail.gmail.com.

Reply via email to