Bug in my template

34 views
Skip to first unread message

Invisible Man

unread,
Nov 20, 2020, 4:53:22 PM11/20/20
to weewx-user

Hello,
I have a silly bug in my weewx template index.html.tmpl.
Is there a way to know which line is wrong?

This is what I have in the logs:

ov 20 22:50:24 vegan weewx[474] DEBUG weewx.drivers.wmr200:   Queuing live packet rx:1900 live_queue_len:1
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'NameMapper.NotFound'>'
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: **** Ignoring template /home/weewx/skins/External/index.html.tmpl
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'h' while searching for 'h'
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: ****    File "cheetah__home_weewx_skins_External_index_html_tmpl_1605908425_09_35362.py", line 158, in respond
Nov 20 22:50:25 vegan weewx[474] ERROR weewx.cheetahgenerator: ****  NotFound: cannot find 'h' while searching for 'h'

gjr80

unread,
Nov 20, 2020, 6:23:46 PM11/20/20
to weewx-user
Hi,

Short answer is no, but you should be able to use the text of the error message to help narrow down the source. In this case you are interested in:

NotFound: cannot find 'h' while searching for 'h'

Start by looking where you have used ‘h’ as a tag, variable or otherwise in an expression in your template.

Gary.

Invisible Man

unread,
Nov 21, 2020, 9:59:17 AM11/21/20
to weewx-user
Ah. A pity.
But I found the bug in  my template :)

-- Axelle
Reply all
Reply to author
Forward
0 new messages