Hi Tom (and Gary and m), As Tom suggested I tried switching to software generation after restoring manager.py to its original state. Unfortunately this did not work,
I am planning on changing weather stations in the coming weeks so I've reverted back to the suggestion m had originally made, that way I can see weather data away from the station console itself. I am happy to test any other changes you may suggest. Reverting manager.py and changing to software generation I still received the following error: Sep 7 18:10:22 falcon. weewx[15974]: engine: Starting up weewx version 3.7.1 Sep 7 18:10:26 falcon. weewx[15974]: wmr200: MainThread: I Time drift between host and console in seconds:26 Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I genStartup() Still receiving archive packets cnt:0 len:1 Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I Using pc time adjusting archive record time by 26 sec 2017-09-07 18:08:00 AEST (1504771680) => 2017-09-07 18:08:26 AEST (1504771706) Sep 7 18:10:56 falcon. weewx[15974]: manager: Added record 2017-09-07 18:08:26 AEST (1504771706) to database 'weewx' Sep 7 18:10:56 falcon. weewx[15974]: wmr200: Thread-2: I USB polling device thread exiting Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I USB polling thread expired Sep 7 18:10:56 falcon. weewx[15974]: wmr200: Thread-1: I Watchdog received shutdown Sep 7 18:10:56 falcon. weewx[15974]: wmr200: Thread-1: I Watchdog thread exiting Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I Watchdog thread expired Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I Received packet count live:5 archive:1 control:2 Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I Received bytes:720 sent bytes:56 Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I Packet archive queue len:0 live queue len:5 Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: W Exiting with packets still in live queue cnt:5 Sep 7 18:10:56 falcon. weewx[15974]: wmr200: MainThread: I Driver gracefully exiting Sep 7 18:10:56 falcon. weewx[15974]: engine: Caught unrecoverable exception in engine: Sep 7 18:10:56 falcon. weewx[15974]: **** 'interval' Sep 7 18:10:56 falcon. weewx[15974]: **** Traceback (most recent call last): Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 871, in main Sep 7 18:10:56 falcon. weewx[15974]: **** engine.run() Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 159, in run Sep 7 18:10:56 falcon. weewx[15974]: **** self.dispatchEvent(weewx.Event(weewx.STARTUP)) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 223, in dispatchEvent Sep 7 18:10:56 falcon. weewx[15974]: **** callback(event) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 508, in startup Sep 7 18:10:56 falcon. weewx[15974]: **** self._catchup(self.engine.console.genStartupRecords) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 622, in _catchup Sep 7 18:10:56 falcon. weewx[15974]: **** origin='hardware')) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 223, in dispatchEvent Sep 7 18:10:56 falcon. weewx[15974]: **** callback(event) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/engine.py", line 588, in new_archive_record Sep 7 18:10:56 falcon. weewx[15974]: **** dbmanager.addRecord(event.record, accumulator=self.old_accumulator) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/manager.py", line 245, in addRecord Sep 7 18:10:56 falcon. weewx[15974]: **** self._addSingleRecord(record, cursor, log_level) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/manager.py", line 1179, in _addSingleRecord Sep 7 18:10:56 falcon. weewx[15974]: **** _weight = self._calc_weight(record) Sep 7 18:10:56 falcon. weewx[15974]: **** File "/usr/share/weewx/weewx/manager.py", line 1545, in _calc_weight Sep 7 18:10:56 falcon. weewx[15974]: **** weight = 60.0 * record['interval'] if self.version >= '2.0' else 1.0 Sep 7 18:10:56 falcon. weewx[15974]: **** KeyError: 'interval' Sep 7 18:10:56 falcon. weewx[15974]: **** Exiting. Sep 7 18:10:56 falcon. python[15974]: detected unhandled Python exception in '/usr/bin/weewxd' Many thanks for your assistance as I have little idea when it comes to Python. Regards, Damien On Thursday, September 7, 2017 at 10:15:50 AM UTC+10, Tom Keffer wrote: > > This problem has been seen before > <https://groups.google.com/d/msg/weewx-user/KNUZY53oKZ8/TyIYa0JABwAJ>. > The workaround solution there was to switch to software record generation. > Give that a try and see if that helps. It's not really a solution, but it > might get you going. > > This driver really needs to be rewritten. It is much more complicated than > necessary. Alas, I do not have a WMR200 at hand (nor, at $250 do I want to > buy one!). > > -tk > > On Wed, Sep 6, 2017 at 4:47 PM, gjr80 <[email protected] <javascript:>> > wrote: > >> And I thought 'reading' the vantage driver was difficult, this one has >> really made my head spin. >> >> When I first read this on my phone last night the log was very difficult >> to read and I saw the comment about historical data and was concerned there >> was an issue with the interval weighting code introduced in 3.7.0, having >> now read the logs on the big screen as well as the rest of the posts it's >> clear to me this is not the case and it is a WMR200 driver issue. >> >> Thinking aloud here as to what is going on. genStartupRecords() is >> called on weeWX startup to catch up any archive records. The very first >> time through, property _pkt is initialised to None and hence the >> _process_packet_complete() method is not called at line 1897 ( >> _process_packet_complete() calls self._pkt.packet_process() (ie >> PacketArchive.packet_process()) which (would) add the interval field to >> the packet). The _sensor_to_fields() method creates the archive record >> that is to be yielded, and it would normally add the interval field to >> the archive record, but since the interval field was not added to the >> packet vide line 1897, no interval field is added to the archive record >> that is yielded. The accumulator then chokes when it tries to interval >> weight the archive record. >> >> Solution, something needs to be introduced to add the interval field to >> the packet in genStartupRecords() after the _poll_for_data() method is >> called at line 1906. I suspect Tom or Matthew will have the elegant code to >> do that, besides my head hurts now. >> >> Gary >> >> >> >> On Thursday, 7 September 2017 02:35:19 UTC+10, mwall wrote: >>> >>> On Wednesday, September 6, 2017 at 11:34:44 AM UTC-4, Tom Keffer wrote: >>>> >>>> >>>> You did commit d4ff72d >>>> <https://github.com/weewx/weewx/commit/d4ff72d8dc8775dec72f8cfbc6a17ee8d9a05d96> >>>> >>>> that was supposed to fix this bug. Are you now saying that you are having >>>> doubts it does? >>>> >>> >>> this looks like a different failure mode than what that commit fixed. >>> >>> >>> >>>> >>> -- >> 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] <javascript:>. >> 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
