Yes, this is a limitation in the way database bindings are presently implemented. It is very hard for a search list extension (in this case, $alltime) to use a custom binding.
Thank you for reminding me. Version 4 would be a good time to introduce these kinds of changes, as they may break backwards compatibility. I've created issue #384 <https://github.com/weewx/weewx/issues/384> to track. -t On Sat, Mar 2, 2019 at 12:06 PM Hartmut Schweidler <[email protected]> wrote: > Thanks > > now weewx 4.0 ... runs under python 3.5, but not completely. > > The upload via FTP is running Thanks > > > progress is under http://wh3080.hes61.de/ > <http://www.google.com/url?q=http%3A%2F%2Fwh3080.hes61.de%2Findex.html&sa=D&sntz=1&usg=AFQjCNG_hKZdxldNPYqaa2PUfp892e_79w> > to > observe > I will post my version in my GIT project as a new version > > one thing is there yet I have at > > in tags.py I used the old version > like > # Iterate over custom span > def spans(self, data_binding=None, context='day', interval=10800): > -----> python3 --> def spans(self, context='day', interval=10800): > for span in weeutil.weeutil.intervalgen(self.timespan.start, > self.timespan.stop, interval): > yield TimespanBinder(span, self.db_lookup, data_binding, > context, self.formatter, self.converter, > **self.option_dict) > > # Iterate over hours in the time period: > def hours(self, data_binding=None): new in python3 is def > hours(self): > return TimespanBinder._seqGenerator(weeutil.weeutil.genHourSpans, > self.timespan, > self.db_lookup, data_binding, > 'hour', self.formatter, > self.converter, **self.option_dict) > > > otherwise there is ERROR in > #for $year in $alltime.years($data_binding='wd_binding') > <tr> > <td>$year.dateTime.format("%Y")</td> > #for $month in $year.months($data_binding='wd_binding') > #if $month.outTempDay.min.raw is not None: > <td class="stats_data" style="$decorator_color('tempO', > $month.outTempDay.min.raw)">$month.outTempDay.min.formatted</td> > #else > <td>-</td> > #end if > #end for > </tr> > #end for > <tr><td colspan='13'>maximale Nachttemperatur in der Zeit von 18:00 > Uhr bis 06:00 Uhr</td></tr> > #for $year in $alltime.years($data_binding='wd_binding') > <tr> > <td>$year.dateTime.format("%Y")</td> > #for $month in $year.months($data_binding='wd_binding') > #if $month.outTempNight.max.raw is not None: > <td class="stats_data" style="$decorator_color('tempO', > $month.outTempNight.max.raw)">$month.outTempNight.max.formatted</td> > #else > <td>-</td> > #end if > #end for > </tr> > #end for > > > lock at http://wh3080.hes61.de/temp.html > > >> Tagestemperatur in °C (Tag oder Nacht) >> Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez >> minimale Tagestemperatur in der Zeit von 06:00 Uhr bis 18:00 Uhr >> 2019 - -3,4 -1,1 - - - - - - - - - >> maximale Nachttemperatur in der Zeit von 18:00 Uhr bis 06:00 Uhr >> 2019 - 10,0 10,9 - - - - - - - - - >> > > > thanks again Hartmut >
