TypeError

39 views
Skip to first unread message

buck...@googlemail.com

unread,
Oct 5, 2021, 12:08:05 AM10/5/21
to weewx-user
Hello, 
my html code :

since yesterday i get this message here:
(what is the reason?)

Oct  4 21:15:22 raspberrypi /weewxd: historygenerator.py: No bootstrap specific labels found
Oct  4 21:15:23 raspberrypi /weewxd: historygenerator.py: Generated 8 tables in 0.44 seconds
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/neowx-material/index.html.tmpl
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: **** Reason: '>' not supported between instances of 'NoneType' and 'int'
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_neowx_material_index_html_tmpl.py", line 210, in respond
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****  TypeError: '>' not supported between instances of 'NoneType' and 'int'
Oct  4 21:15:53 raspberrypi weewx[8412] INFO weewx.cheetahgenerator: Generated 14 files for report StandardReport in 30.41 seconds
Oct  4 21:15:53 raspberrypi weewx[8412] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Oct  4 21:15:55 raspberrypi weewx[8412] INFO weewx.cheetahgenerator: Generated 1 files for report Highcharts in 2.35 seconds
Oct  4 21:16:07 raspberrypi weewx[8412] INFO weewx.reportengine: ftpgenerator: Ftp'd 37 files in 12.43 seconds

gjr80

unread,
Oct 5, 2021, 12:32:31 AM10/5/21
to weewx-user
The clues are in the error message:

Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/neowx-material/index.html.tmpl
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: **** Reason: '>' not supported between instances of 'NoneType' and 'int'
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_neowx_material_index_html_tmpl.py", line 210, in respond
Oct  4 21:15:32 raspberrypi weewx[8412] ERROR weewx.cheetahgenerator: ****  TypeError: '>' not supported between instances of 'NoneType' and 'int'

Somewhere in the /etc/weewx/skins/neowx-material/index.html.tmpl template you have an expression containing a greater than comparison '>', the left hand side of which is evaluating to None and the right hand side is an integer and that is causing a python TypeError. I suggest you look through your template for all the '>' used in an expression (there will be a lot used not in an expression but in plain HTML) and ask yourself a question, could the left hand side of this equation be None? You may be able to cull some possibilities since we know the right hand side of the expression is an integer. Once located, it could be that you need to either adapt the template to handle that value being None or you need to adapt your data so that it is never None. You appear to be using the neowx_material skin, I would suggest you go back to the skin author and ask for support.

Gary
Reply all
Reply to author
Forward
0 new messages