I don't know. How are you using the $span() tags? In a loop, I assume?

On Wed, Feb 28, 2024 at 3:25 PM František Slimařík <[email protected]>
wrote:

> Hello,
>
> is it possible that leap year causes issue in span tag? I am using these:
>
> $span($day_delta=365).days
> $span($year_delta=1).months
>
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: Evaluation of template
> /etc/weewx/skins/neowx/year.html.tmpl failed with exception '<class
> 'ValueError'>'
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: **** Ignoring template
> /etc/weewx/skins/neowx/year.html.tmpl
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: **** Reason: day is out of range for month
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****  Traceback (most recent call last):
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****    File
> "/usr/share/weewx/weewx/cheetahgenerator.py", line 334, in generate
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****      unicode_string =
> compiled_template.respond()
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****    File
> "_etc_weewx_skins_neowx_year_html_tmpl.py", line 1380, in respond
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/tags.py", line
> 132, in span
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****      year_delta=year_delta, boundary=boundary),
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****    File "/usr/share/weewx/weeutil/weeutil.py",
> line 402, in archiveSpanSpan
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****      start_dt = time_dt.replace(year=year,
> month=month)
> Feb 29 00:10:43 rocky-weather-machine weewxd[405028]: ERROR
> weewx.cheetahgenerator: ****  ValueError: day is out of range for month
>
> --
> 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/6ca52acb-9235-4154-9e01-ba5e23a9750dn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/6ca52acb-9235-4154-9e01-ba5e23a9750dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPq0zECBN016YJK8gbzfY_gM4rjGFxmFUDmjpHWEdGcfTH2Tog%40mail.gmail.com.

Reply via email to