Yes, that would be the error I outlined earlier. Type 'wind' appears only in the daily summaries. Seven days prior to a moment does not necessarily start at the beginning of a day, so the daily summaries are not always available.
But, it makes me think: perhaps tag $span should have an argument that forces the start time to be the beginning of the day...? Something like $span($day_delta=7, $bod=True) If 'bod' (aka, 'beginning of day') is True, then the start time is rounded to the start of the day. Or, am I being too clever? -tk On Fri, Sep 4, 2020 at 5:50 AM Phil Green <[email protected]> wrote: > Hello Tom, > I will try $seven_day rather than $week. > When I tried $span($day_delta=7) instead of $week I got the errors. > I have looked back in my log at the error messages and they are shown > below, I have since gone back to using $week > > Sep 4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.manager: Added record > 2020-09-04 11:35:00 BST (1599215700) to database 'weewx.sdb' > Sep 4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.manager: Added record > 2020-09-04 11:35:00 BST (1599215700) to daily summary in 'weewx.sdb' > Sep 4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.restx: PWSWeather: > Published record 2020-09-04 11:35:00 BST (1599215700) > Sep 4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.restx: Wunderground-PWS: > Published record 2020-09-04 11:35:00 BST (1599215700) > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: > Generate failed with exception '<class 'NameMapper.NotFound'>' > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > Ignoring template /home/weewx/skins/Seasons/index.html.tmpl > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > Reason: cannot find 'maxtime' while searching for 'wind.maxtime' > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > Traceback (most recent call last): > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > unicode_string = compiled_template.respond() > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_Seasons_index_html_tmpl.py", line 309, in respond > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1707, in > _handleCheetahInclude > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > self._CHEETAH__cheetahIncludes[_includeID].respond(trans) > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > File > "cheetah__home_weewx_skins_Seasons_hilo_inc_1599215717_0843155_15331.py", > line 372, in respond > Sep 4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** > NameMapper.NotFound: cannot find 'maxtime' while searching for > 'wind.maxtime' > Sep 4 11:35:17 Pi3-Weewx weewx[5658] INFO weewx.cheetahgenerator: > Generated 8 files for report SeasonsReport in 2.57 seconds > Sep 4 11:35:19 Pi3-Weewx weewx[5658] INFO weewx.imagegenerator: Generated > 14 images for report SeasonsReport in 1.14 seconds > > In hilo.ic > The section showing when the max wind occurred, I copied the variable from > the tooltip for that section as tooltips don't work on my iPad in Safari? > > <tr> > <td class="label">Wind Max</td> > #for $archive in $archive_data > <td class="data new_row hilo_$archive[0]"> > <span title="$archive[1].wind.maxtime"> > $archive[1].wind.max.format(add_label=False) > ($archive[1].wind.maxtime)</span><br/> > $archive[1].wind.gustdir.format(add_label=False) > </td> > #end for > <td class="units"> > $unit.label.wind<br/> > $unit.label.windDir > </td> > </tr> > > > Will let you know how I get on using $seven_day > > Regards > Phil > > On Friday, September 4, 2020 at 1:05:48 PM UTC+1 [email protected] wrote: > >> You didn't post what the "syntax errors" are, so it's hard to evaluate >> what went wrong. I suspect the problem is a technical one: precisely seven >> days earlier from the time may or may not lie on the start of a day. If it >> does not lie on the start of a day, then the daily summaries cannot be used >> to calculate 'wind' statistics. But, without seeing the "syntax error", I'm >> just guessing. >> >> Why not just use the search list extension example that comes with WeeWX? >> It creates a tag $seven_day, which does what you want. >> >> See the section *Extending the list >> <http://www.weewx.com/docs/customizing.htm#extending_the_list>* in the >> Customization Guide. >> >> -tk >> >> On Fri, Sep 4, 2020 at 4:00 AM Phil Green <[email protected]> wrote: >> >>> Thanks for the info. >>> Where would I change the >>> $week to $span($day_delta=7) >>> >>> In the actual report file, in my case hilo.inc or in some definition >>> elsewhere to set the aggravation period? >>> I have tried it in hilo.inc >>> changing:- >>> #set $archive_data = [('day', $day), ('week', $week), ('month', $month), >>> ('year', $year), ('rainyear', $rainyear)] >>> to: >>> #set $archive_data = [('day', $day), ('week', $span($day_delta=7)), >>> ('month', $month), ('year', $year), ('rainyear', $rainyear)] >>> but it causes syntax errors. >>> So where would I change the definition of $week to a rolling 7 day >>> period? >>> Regards >>> Phil >>> >>> On Tuesday, September 1, 2020 at 12:36:02 PM UTC+1 [email protected] >>> wrote: >>> >>>> → see $span($day_delta=7) for rolling 7 days (vs $week for since start >>>> of week) >>>> >>>> On 1 Sep 2020, at 7:27 am, Tom Keffer <[email protected]> wrote: >>>> >>>> NB: The weekly statistics start *Sunday*. It is not the same as "last >>>> 7 days." >>>> >>>> >>>> -- >>> 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/97602bc2-65a0-4e3b-a9d2-782f77d605fen%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/97602bc2-65a0-4e3b-a9d2-782f77d605fen%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/2f6d655f-ed0c-4133-ac8a-fc4437be08a7n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/2f6d655f-ed0c-4133-ac8a-fc4437be08a7n%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/CAPq0zEA7nMMT7vpOOsCP1DVFZ-mUPGuFL5Smi4qF_DV__VADXw%40mail.gmail.com.
