You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I restart the server and republish the reports. All reports work fine and show knots except the yearly reports for specific years as seen below. I can't figure what I am doing wrong and the error seems so unrelated to Units.
Additional context
Evaluation of template /etc/weewx/skins/weewx-wdc/year-%Y.html.tmpl failed with exception '<class 'NameError'>'
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/weewx-wdc/year-%Y.html.tmpl
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** Reason: free variable 'value' referenced before assignment in enclosing scope
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_weewx_wdc_year__Y_html_tmpl.py", line 203, in respond
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 503, in respond
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 142, in __errorCatcher11
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "", line 1, in
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/weewx_wdc.py", line 2247, in get_climatological_day
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** return len(list(days))
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/weewx_wdc.py", line 2244, in
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** (windGust, windGust_max_vt[1], windGust_max_vt[2]))[0] >= value, windGust_max_vt[0]
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** NameError: free variable 'value' referenced before assignment in enclosing scope
The text was updated successfully, but these errors were encountered:
nicholaswaton
changed the title
[BUG] when changing group_speed to knots in weewx.conf, and restarting weewx, breaks
[BUG] year-%Y.html.tmpl fails when changing group_speed to knots in weewx.conf
Jan 9, 2024
Yes, I can reproduce the bug. I did not take into account that somebody could use knots as the unit for wind/gust speed, etc. This breaks the calculation of storm days.
Describe the bug
I am on version 3.4. I've been trying to change the wind unit to knots.
To Reproduce
When I modify the weewx.conf file to show knots instead of mph by adding this
[[[Units]]]
[[[[Groups]]]]
group_speed = knot
group_speed2 = knot
I added the same to skin.conf
I restart the server and republish the reports. All reports work fine and show knots except the yearly reports for specific years as seen below. I can't figure what I am doing wrong and the error seems so unrelated to Units.
Additional context
Evaluation of template /etc/weewx/skins/weewx-wdc/year-%Y.html.tmpl failed with exception '<class 'NameError'>'
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/weewx-wdc/year-%Y.html.tmpl
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** Reason: free variable 'value' referenced before assignment in enclosing scope
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_weewx_wdc_year__Y_html_tmpl.py", line 203, in respond
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 503, in respond
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 142, in __errorCatcher11
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "", line 1, in
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/weewx_wdc.py", line 2247, in get_climatological_day
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** return len(list(days))
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/user/weewx_wdc.py", line 2244, in
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** (windGust, windGust_max_vt[1], windGust_max_vt[2]))[0] >= value, windGust_max_vt[0]
Jan 9 19:53:17 bigfastlittledisk weewx[170113] ERROR weewx.cheetahgenerator: **** NameError: free variable 'value' referenced before assignment in enclosing scope
The text was updated successfully, but these errors were encountered: