No module named wmr200 (Weewx 4.3.0)

91 views
Skip to first unread message

Invisible Man

unread,
Jan 20, 2021, 4:46:32 PM1/20/21
to weewx-user

Hey! What's happening?! I've upgraded weewx 4.2.0 to 4.3.0 (on a Raspberry Pi) and I get this error !

```
Jan 20 22:33:39 vegan python2[6532]: weewx[6532] INFO __main__: Initializing weewx version 4.3.0
Jan 20 22:33:39 vegan python2[6532]: weewx[6532] INFO __main__: Using Python 2.7.16 (default, Oct 10 2019, 22:02:15
                                     [GCC 8.3.0]
Jan 20 22:33:39 vegan python2[6532]: weewx[6532] INFO __main__: Platform Linux-5.4.72-v7+-armv7l-with-debian-10.7
Jan 20 22:33:39 vegan python2[6532]: weewx[6532] INFO __main__: Locale is 'en_GB.UTF-8'
Jan 20 22:33:39 vegan python2[6532]: weewx[6532] INFO __main__: PID file is /var/run/weewx.pid
Jan 20 22:33:39 vegan weewx[6520]: Starting weewx weather system: weewx.
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] INFO __main__: Debug is 1
Jan 20 22:33:39 vegan systemd[1]: Started LSB: weewx weather system.
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] DEBUG __main__: Initializing engine
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] INFO weewx.engine: Loading station type WMR200 (weewx.drivers.wmr2
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__: Caught unrecoverable exception:
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****  No module named wmr200
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****  Traceback (most recent call last):
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", lin
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(c
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****      self.setupStation(config_dict)
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****      __import__(driver)
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****  ImportError: No module named wmr200
Jan 20 22:33:39 vegan python2[6536]: weewx[6536] CRITICAL __main__:     ****  Exiting.
```

and indeed there is no longer wmr200 in /usr/share/weewx/weewx/drivers.
Now only wmr100 or wmr300.py ?!

John Kline

unread,
Jan 20, 2021, 4:52:46 PM1/20/21
to weewx...@googlegroups.com
See the 4.3 change log here:

The WMR200 driver is no longer supported. An unsupported version can be found
at https://github.com/weewx/weewx-wmr200. Support for LaCrosse WS23xx and
Oregon WMR300 will continue.


On Jan 20, 2021, at 1:46 PM, Invisible Man <axelle....@gmail.com> wrote:


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0754b53c-a6b1-4d9d-8924-2b627122f182n%40googlegroups.com.

Invisible Man

unread,
Jan 20, 2021, 4:55:57 PM1/20/21
to weewx-user
Ok, I see WMR200 has been removed in December 2020, and is now an extension.
I install the extension, and I get more errors

-- Logs begin at Wed 2021-01-20 16:50:14 CET. --
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/manager.py", line 1255, in patch_sums
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****      self.recalculate_weights(start_d=datetime.date(2020,6,1))
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/manager.py", line 1182, in recalculate_weights
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****      self._do_tranche(mark_d, end_of_tranche_d, weight_fn, progress_fn)
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/manager.py", line 1215, in _do_tranche
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****      weight = weight_fn(self, rec)
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/manager.py", line 1366, in _calc_weight
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****      "Non-positive value for record field 'interval': %s" % (record['interval'],))
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****  IntervalError: Non-positive value for record field 'interval': 0
Jan 20 22:53:44 vegan python2[7867]: weewx[7867] CRITICAL __main__:     ****  Exiting.

I'm really unhappy about that :(
When you upgrade, you expect things to work, not things to get broken. If I had known, I wouldn't have upgraded.
How can I revert to 4.2.0 ?

John Kline

unread,
Jan 20, 2021, 5:02:25 PM1/20/21
to weewx...@googlegroups.com
I don’t recommend reverting to 4.2 as it has some issues.

The problem you are describing now is do to some issues in your db; specifically, intervals of 0 (4.3 is less forgiving).  I found a thread to address it from Jan 6.  I’ve pasted Tom’s response below.  Rather than deleting records, if you know what the correct interval should be, you could update the records.

Good heavens. That's a lot. I wonder where they all came from?

No matter. Here's how to fix (and sorry for giving you the wrong path to the database).

# First stop weewx
sudo systemctl stop weewx

cd /var/lib/weewx

# Make a backup:
sudo cp weewx.sdb weewx.sdb.backup

# Delete all records where interval equals zero:
sudo sqlite3 weewx.sdb
sqlite> delete from archive where interval==0;
sqlite> .quit

# Restart weewx
sudo systemctl start weewx

If you get this error again, there is something wrong with the configuration of your system.

-tk

On Jan 20, 2021, at 1:56 PM, Invisible Man <axelle....@gmail.com> wrote:

Ok, I see WMR200 has been removed in December 2020, and is now an extension.
--
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.

Invisible Man

unread,
Jan 21, 2021, 12:29:00 PM1/21/21
to weewx-user
Ok thanks - that fixed the problem.

Actually, I got a bit frightened, because at startup, I got:

...
Jan 21 18:22:19 vegan python2[25172]: weewx[25172] DEBUG weewx.manager: recalculate_weights: Tranche size 100
Jan 21 18:22:32 vegan python2[25172]: weewx[25172] ERROR user.wmr200: read_device() USB Error Reason:[Errno 110] Operation timed out

But, I checked the weather station is there :

$ lsusb
Bus 001 Device 005: ID 0fde:ca01 Oregon Scientific WMRS200 weather station
...

And actually, it seems after a while that it is working:

Jan 21 18:26:44 vegan python2[25172]: weewx[25172] DEBUG user.wmr200:   Queuing archive packet rx:63 archive_queue_len:1
Jan 21 18:26:45 vegan python2[25172]: weewx[25172] INFO user.wmr200: genStartup() Still receiving archive packets cnt:62 len:1
...
Jan 21 18:26:44 vegan python2[25172]: weewx[25172] DEBUG user.wmr200:   Queuing archive packet rx:63 archive_queue_len:1
Jan 21 18:26:45 vegan python2[25172]: weewx[25172] INFO user.wmr200: genStartup() Still receiving archive packets cnt:62 len:1

So, probably just an initial startup error.

Thanks for your help!

Invisible Man

unread,
Jan 21, 2021, 2:04:48 PM1/21/21
to weewx-user
Normally, every 10 minutes, the weather website is uploaded via FTP. This still hasn't occurred, I can't see why... Is it because it is still catching up with data (weewx was stopped from yesterday night to now) ?

Jan 21 20:01:17 vegan python2[29779]: weewx[29779] DEBUG user.wmr200:   Queuing live packet rx:71 live_queue_len:1
Jan 21 20:01:18 vegan python2[29779]: weewx[29779] DEBUG user.wmr200: genLoop() Yielding live queued packet id:78
Jan 21 20:01:20 vegan python2[29779]: weewx[29779] DEBUG user.wmr200:   Queuing live packet rx:72 live_queue_len:1
Jan 21 20:01:21 vegan python2[29779]: weewx[29779] DEBUG user.wmr200: genLoop() Yielding live queued packet id:79
...

And this is weewx.conf:

[StdReport]
    # This section specifies what reports, using which skins, to generate.
    
    # Where the skins reside, relative to WEEWX_ROOT:
    SKIN_ROOT = skins
    
    # Where the generated reports should go, relative to WEEWX_ROOT:
    HTML_ROOT = public_html
    
    # The database binding indicates which data should be used in reports
    data_binding = wx_binding

 [[FTP]]
        skin = Ftp
        
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        #
        # If you wish to use FTP, uncomment and fill out the next four lines:
        user = CENSORED :)
        password = CENSORED :)
        server = CENSORED :)
        path = CENSORED :)
        
        # If you wish to upload files from something other than what HTML_ROOT
        # is set to above, then reset it here:
        HTML_ROOT = external_html
        
        # Most FTP servers use port 21, but if yours is different, you can
        # change it here
        port = 21
        
        # Set to 1 to use passive mode, zero for active mode:
        passive = 1
        
        # How many times to try to transfer a file before giving up:
        max_tries = 5

        # Set to True for a secure FTP (SFTP) connection. Not all servers
        # support this.
        secure_ftp = False

Reminder: this config has been working for ages. I just recently upgraded to 4.3.0, and therefore had to install the WMR200 extension. So, if there's an error, it has to do with that probably.

Thanks

John Kline

unread,
Jan 21, 2021, 3:27:28 PM1/21/21
to weewx...@googlegroups.com
I don’t use this driver, but looking at the driver code, it looks like you would see the following message *fragment* in the log when it finishes processing the missed archive records:
  genStartup() phase exiting since looks like all

As I don’t have experience with this driver, you are better off running with debug and posting the log.


On Jan 21, 2021, at 11:04 AM, Invisible Man <axelle....@gmail.com> wrote:



Invisible Man

unread,
Jan 21, 2021, 3:43:05 PM1/21/21
to weewx-user

>it looks like you would see the following message *fragment* in the log

I have no word "fragment" in the logs:

$ sudo journalctl -u weewx | grep -i fragment
$

>As I don’t have experience with this driver, you are better off running with debug and posting the log.

I have pages of logs, but this is the most recent

Jan 21 21:42:22 vegan python2[29779]: weewx[29779] DEBUG user.wmr200:   Queuing live packet rx:1500 live_queue_len:1
Jan 21 21:42:23 vegan python2[29779]: weewx[29779] DEBUG user.wmr200: genLoop() Yielding live queued packet id:1615
Jan 21 21:42:23 vegan python2[29779]: weewx[29779] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-01-21 21:42:22 CET (1611261742): dateTime: 1611261742, usUnits: 16, windchill: None, windDir: 337.5, windGust: 0.0, windSpeed: 0.0
Jan 21 21:42:25 vegan python2[29779]: weewx[29779] DEBUG user.wmr200:   Queuing live packet rx:1501 live_queue_len:1
Jan 21 21:42:26 vegan python2[29779]: weewx[29779] DEBUG user.wmr200: genLoop() Yielding live queued packet id:1616
Jan 21 21:42:26 vegan python2[29779]: weewx[29779] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-01-21 21:42:25 CET (1611261745): altimeter: 995.0, dateTime: 1611261745, forecastIcon: 6, pressure: 995.0, usUnits: 16
Jan 21 21:42:30 vegan python2[29779]: weewx[29779] DEBUG user.wmr200:   Queuing live packet rx:1502 live_queue_len:1
Jan 21 21:42:31 vegan python2[29779]: weewx[29779] DEBUG user.wmr200: genLoop() Yielding live queued packet id:1617
Jan 21 21:42:31 vegan python2[29779]: weewx[29779] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-01-21 21:42:30 CET (1611261750): dateTime: 1611261750, inHeatindex: None, inHumidity: 46, inTemp: 20.7, usUnits: 16
Jan 21 21:42:36 vegan python2[29779]: weewx[29779] DEBUG user.wmr200:   Queuing live packet rx:1503 live_queue_len:1
Jan 21 21:42:37 vegan python2[29779]: weewx[29779] DEBUG user.wmr200: genLoop() Yielding live queued packet id:1618
Jan 21 21:42:37 vegan python2[29779]: weewx[29779] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-01-21 21:42:36 CET (1611261756): dateTime: 1611261756, usUnits: 16, windchill: None, windDir: 337.5, windGust: 0.0, windSpeed: 0.0

John Kline

unread,
Jan 21, 2021, 3:55:01 PM1/21/21
to weewx...@googlegroups.com
Damn, that’s funny.

I was giving you a partial line, that is what I was calling a fragment.

grep for “ genStartup() phase exiting since looks like all”


On Jan 21, 2021, at 12:43 PM, Invisible Man <axelle....@gmail.com> wrote:



Invisible Man

unread,
Jan 21, 2021, 4:16:27 PM1/21/21
to weewx-user
>Damn, that’s funny.
>I was giving you a partial line, that is what I was calling a fragment.
>grep for “ genStartup() phase exiting since looks like all”

LOL. Sorry, I didn't understand.

$ sudo journalctl -u weewx | grep "genStartup() phase exiting"
Jan 21 19:44:52 vegan python2[26283]: weewx[26283] INFO user.wmr200: genStartup() phase exiting since looks like all archive packets have been retrieved after 120 sec cnt:2
Jan 21 19:58:40 vegan python2[29779]: weewx[29779] INFO user.wmr200: genStartup() phase exiting since looks like all archive packets have been retrieved after 120 sec cnt:2
Jan 21 21:50:03 vegan python2[29779]: weewx[29779] INFO user.wmr200: genStartup() phase exiting since looks like all archive packets have been retrieved after 120 sec cnt:0
Jan 21 21:57:33 vegan python2[2931]: weewx[2931] INFO user.wmr200: genStartup() phase exiting since looks like all archive packets have been retrieved after 120 sec cnt:0

So I do get some of these.

John Kline

unread,
Jan 21, 2021, 4:27:04 PM1/21/21
to weewx...@googlegroups.com
As such, I don’t *think* your problem is that it’s still processing old archive records.

Others will have to help you with FTP.  It’s probably not the driver and perhaps not related to 4.3.  You might need debug = 2 to see FTP progress in more detail in the log.  I don’t use FTP in weewx (I use ssh).  Others are better to help you on this one.

On Jan 21, 2021, at 1:16 PM, Invisible Man <axelle....@gmail.com> wrote:



Invisible Man

unread,
Jan 22, 2021, 9:28:24 AM1/22/21
to weewx-user
thanks. It is then probably another issue. Thanks.
Reply all
Reply to author
Forward
0 new messages