and days does not work with years. Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>' Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/index.html.tmpl Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** Reason: day() got an unexpected keyword argument 'years_ago' Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last): Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond() Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** File "cheetah__etc_weewx_skins_Belchertown_index_html_tmpl_1627749978_8315864_14895.py", line 1764, in respond Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** self._CHEETAH__cheetahIncludes[_includeID].respond(trans) Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** File "cheetah__etc_weewx_skins_Belchertown_index_hook_after_snapshot_inc_1627754298_769225_26517.py", line 152, in respond Jul 31 19:58:18 weather weewx[122681] ERROR weewx.cheetahgenerator: **** TypeError: day() got an unexpected keyword argument 'years_ago'
Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>' Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/index.html.tmpl Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** Reason: day() got an unexpected keyword argument 'years_ago' Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last): Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 326, in generate Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond() Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_Belchertown_index_html_tmpl.py", line 1764, in respond Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** self._CHEETAH__cheetahIncludes[_includeID].respond(trans) Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** File "_etc_weewx_skins_Belchertown_index_hook_after_snapshot_inc.py", line 152, in respond Jul 31 19:58:21 weather wee_reports[133909] ERROR weewx.cheetahgenerator: **** TypeError: day() got an unexpected keyword argument 'years_ago' David Schulz schrieb am Samstag, 31. Juli 2021 um 20:19:46 UTC+2: > Hi, i need some help to show the date and temp from 2 years ago. what is > the best method to take into account the leap years? > > I know this site. -> > http://weewx.com/docs/customizing.htm#Time_period_$current > > Currently I try it with: > > $day($days_ago=730).dateTime.format("%d.%m.%Y") > > But the solution is 01.08.2019 for 31.07.2021. Are there any other options? > -- 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/79818aff-62eb-4547-a315-996ef543b41cn%40googlegroups.com.
