If I add the month aggregation to my templates, Cheetah chokes.
#for $m in $range(12)
{ "month": $month($months_ago=$m).outTemp.min },
#end for
Produces the following error:
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: Evaluation of template
/etc/weewx/skins/Seasons/curves.json.tmpl failed with exception '<type
'exceptions.TypeError'>'
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** Ignoring template
/etc/weewx/skins/Seasons/curves.json.tmpl
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** Reason: __call__() got an unexpected keyword
argument 'months_ago'
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** Traceback (most recent call last):
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** File
"/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** File
"_etc_weewx_skins_Seasons_curves_json_tmpl.py", line 109, in respond
Apr 03 13:07:04 weather python2[21603]: wee_reports[21603] ERROR
weewx.cheetahgenerator: **** TypeError: __call__() got an unexpected
keyword argument 'months_ago'
However, other aggregations (days, weeks, years) work fine:
#for $m in $range(12)
{ "month": $year($years_ago=$m).outTemp.min },
#end for
No errors produced, output is as expected.
What am I doing wrong?
--
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/16b67157-78d9-4af4-8241-4746023cdb66n%40googlegroups.com.