Fixed in commit ba86c25
<https://github.com/weewx/weewx/commit/ba86c254294ff2036bbc6df66bb29965d7a685cd>,
to appear in V3.9.

Thanks for your help!

-tk

On Wed, Sep 26, 2018 at 10:46 PM Mike Hawkins <duckris...@gmail.com> wrote:

> Excellent ! That has solved the problem.
>
> Thank you very much
>
> Best regards
>
> Mike
>
>
> On Thursday, September 27, 2018 at 1:52:13 AM UTC+1, Thomas Keffer wrote:
>>
>> Try this one.
>>
>> -tk
>>
>> On Wed, Sep 26, 2018 at 3:28 PM Mike Hawkins <duckr...@gmail.com> wrote:
>>
>>> Unfortunately your new tags.py did not fix my problem.
>>>
>>> If I put a simple print into the
>>>
>>>     def records(self, data_binding=None):
>>>         manager = self.db_lookup(data_binding)
>>>         for record in manager.genBatchRecords(self.timespan.start,
>>> self.timespan.stop):
>>>             yield CurrentObj(self.db_lookup, data_binding,
>>> record['dateTime'], self.formatter,
>>>                              self.converter, record=record)
>>>
>>>
>>> routine, then it shows that data_binding is always None.  But I don't
>>> know how to work back up to find out where the data_binding gets lost.
>>>
>>> Regards
>>>
>>> Mike
>>>
>>>
>>>
>>>
>>> On Wednesday, September 26, 2018 at 1:19:12 AM UTC+1, Thomas Keffer
>>> wrote:
>>>>
>>>> This is a bug. Try this version of tags.py.
>>>>
>>>> To answer your other questions, there are a bunch of tests that use
>>>> $day, as well as other tags. Look in
>>>> bin/weewx/test/test_skins/StandardTest.
>>>>
>>>> The "context" used in the tags is for formatting. It's how it knows to
>>>> format a day related time as hh:mm, but a month related time as hh:mm
>>>> dd-MM. Nothing to do with databases.
>>>>
>>>> Let me know if this new tags.py solves your problem!
>>>>
>>>> -tk
>>>>
>>>> On Tue, Sep 25, 2018 at 4:31 PM mwall <goo...@lancet.mit.edu> wrote:
>>>>
>>>>> tom and gary,
>>>>>
>>>>> do you know if there is a unit test for the $day tag (or any other
>>>>> tag, for that matter)?  i'm not finding anything.
>>>>>
>>>>> also, this looks suspect, but perhaps not relevant to this problem.
>>>>>  in tags.py i see this:
>>>>>
>>>>>
>>>>>     def hour(self, data_binding=None, hours_ago=0):
>>>>>
>>>>>         return
>>>>> TimespanBinder(weeutil.weeutil.archiveHoursAgoSpan(self.report_time,
>>>>> hours_ago=hours_ago),
>>>>>
>>>>>                               self.db_lookup,
>>>>> data_binding=data_binding,
>>>>>
>>>>>                               context='day',
>>>>> formatter=self.formatter, converter=self.converter,
>>>>>
>>>>>                               **self.option_dict)
>>>>>
>>>>>
>>>>> should the context be 'hour' not 'day'?
>>>>>
>>>>> m
>>>>>
>>>>> --
>>>>> 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 weewx-user+...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>> 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 weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to