upgrade from 3.8.2 to 3.9.1 failure

95 views
Skip to first unread message

Ian Prescott

unread,
May 18, 2019, 8:05:48 PM5/18/19
to weewx-user
Hi
I did an upgrade on my pi and by default weewx got upgraded as well.
After a reboot the syslog shows the following.
Any help would be appreciated.
Thanks


May 19 09:18:31 weatherpi systemd[1]: Starting LSB: weewx weather system...
May 19 09:18:31 weatherpi weewx[2257]: engine: Initializing weewx version 3.9.1
May 19 09:18:31 weatherpi weewx[2257]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) #012[GCC 4.9.2]
May 19 09:18:31 weatherpi weewx[2257]: engine: Platform Linux-4.14.78-v7+-armv7l-with-debian-8.0
May 19 09:18:31 weatherpi weewx[2257]: engine: Locale is 'en_AU.UTF-8'
May 19 09:18:31 weatherpi weewx[2257]: engine: pid file is /var/run/weewx.pid
May 19 09:18:31 weatherpi weewx[2247]: Starting weewx weather system: weewx.
May 19 09:18:31 weatherpi systemd[1]: Started LSB: weewx weather system.
May 19 09:18:31 weatherpi weewx[2261]: engine: Using configuration file /etc/weewx/weewx.conf
May 19 09:18:31 weatherpi weewx[2261]: engine: Debug is 1
May 19 09:18:31 weatherpi weewx[2261]: engine: Initializing engine
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
May 19 09:18:31 weatherpi weewx[2261]: fousb: driver version is 1.9
May 19 09:18:31 weatherpi weewx[2261]: fousb: power cycling enabled for port 4 on hub 001:004
May 19 09:18:31 weatherpi weewx[2261]: fousb: polling mode is PERIODIC
May 19 09:18:31 weatherpi weewx[2261]: fousb: polling interval is 60
May 19 09:18:31 weatherpi weewx[2261]: fousb: found station on USB bus=001 device=006
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading service weewx.engine.StdTimeSynch
May 19 09:18:31 weatherpi weewx[2261]: engine: Finished loading service weewx.engine.StdTimeSynch
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading service weewx.engine.StdConvert
May 19 09:18:31 weatherpi weewx[2261]: engine: StdConvert target unit is 0x1
May 19 09:18:31 weatherpi weewx[2261]: engine: Finished loading service weewx.engine.StdConvert
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading service weewx.engine.StdCalibrate
May 19 09:18:31 weatherpi weewx[2261]: engine: Finished loading service weewx.engine.StdCalibrate
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading service weewx.engine.StdQC
May 19 09:18:31 weatherpi weewx[2261]: engine: Finished loading service weewx.engine.StdQC
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading service weewx.wxservices.StdWXCalculate
May 19 09:18:31 weatherpi weewx[2261]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
May 19 09:18:31 weatherpi weewx[2261]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
May 19 09:18:31 weatherpi weewx[2261]: engine: Finished loading service weewx.wxservices.StdWXCalculate
May 19 09:18:31 weatherpi weewx[2261]: engine: Loading service weewx.engine.StdArchive
May 19 09:18:31 weatherpi weewx[2261]: engine: Archive will use data binding wx_binding
May 19 09:18:31 weatherpi weewx[2261]: engine: Record generation will be attempted in 'software'
May 19 09:18:31 weatherpi weewx[2261]: engine: Using archive interval of 300 seconds (software record generation)
May 19 09:18:31 weatherpi weewx[2261]: engine: Use LOOP data in hi/low calculations: 1
May 19 09:18:31 weatherpi weewx[2261]: manager: Daily summary version is 2.0
May 19 09:18:31 weatherpi weewx[2261]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
May 19 09:18:31 weatherpi weewx[2261]: manager: Starting backfill of daily summaries
May 19 09:18:32 weatherpi weewx[2261]: engine: Caught unrecoverable exception in engine:
May 19 09:18:32 weatherpi weewx[2261]:     ****  Non-positive value for record field 'interval': 0
May 19 09:18:32 weatherpi weewx[2261]:     ****  Traceback (most recent call last):
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/engine.py", line 884, in main
May 19 09:18:32 weatherpi weewx[2261]:     ****      engine = engine_class(config_dict)
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/engine.py", line 78, in __init__
May 19 09:18:32 weatherpi weewx[2261]:     ****      self.loadServices(config_dict)
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/engine.py", line 142, in loadServices
May 19 09:18:32 weatherpi weewx[2261]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/engine.py", line 500, in __init__
May 19 09:18:32 weatherpi weewx[2261]:     ****      self.setup_database(config_dict)
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/engine.py", line 617, in setup_database
May 19 09:18:32 weatherpi weewx[2261]:     ****      _nrecs, _ndays = dbmanager.backfill_day_summary() # @UnusedVariable
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1469, in backfill_day_summary
May 19 09:18:32 weatherpi weewx[2261]:     ****      weight = self._calc_weight(rec)
May 19 09:18:32 weatherpi weewx[2261]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1582, in _calc_weight
May 19 09:18:32 weatherpi weewx[2261]:     ****      raise ValueError("Non-positive value for record field 'interval': %s" % (record['interval'], ))
May 19 09:18:32 weatherpi weewx[2261]:     ****  ValueError: Non-positive value for record field 'interval': 0
May 19 09:18:32 weatherpi weewx[2261]:     ****  Exiting.
May 19 09:33:16 weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun May 19 09:34:46 2019 [try http://www.rsyslog.com/e/2007 ]
May 19 09:37:44 weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun May 19 09:39:14 2019 [try http://www.rsyslog.com/e/2007 ]
May 19 09:40:20 weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun May 19 09:41:50 2019 [try http://www.rsyslog.com/e/2007 ]

Leon Shaner

unread,
May 18, 2019, 8:40:28 PM5/18/19
to weewx...@googlegroups.com
Logs too abbreviated, or at least I am not able to pick out which driver / weatherstation version of are running.  Please expound.
WMR200, WMR300, both have this issue.  Maybe others.
Which model is yours?

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)
--
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/CAN84nRuJgEBgTzxez4a3CLdwUyrc8SjBCAur2PxU-J23wn2Tzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ian Prescott

unread,
May 18, 2019, 9:03:08 PM5/18/19
to weewx-user
sorry
the station is an Aercus 3080
and I am trying to find the howto on posting the config file

Leon Shaner

unread,
May 18, 2019, 9:08:42 PM5/18/19
to weewx...@googlegroups.com
Hey, Ian,

You can use "wee_debug --info > /var/tmp/wee_debug.txt 2>&1" to write a helpful file at /var/tmp/wee_debug.txt for attaching to an e-mail.

You may want to scan the output anyway, in case something important didn't get obfuscated.  It does a good job with passwords, but ya never know... software... bugs happen.  :-/


Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)

mwall

unread,
May 18, 2019, 10:02:27 PM5/18/19
to weewx-user
On Saturday, May 18, 2019 at 8:05:48 PM UTC-4, Ian Prescott wrote:

May 19 09:18:32 weatherpi weewx[2261]:     ****  ValueError: Non-positive value for record field 'interval': 0
May 19 09:18:32 weatherpi weewx[2261]:     ****  Exiting.

you have some bogus historical data in your station's logger - probably corrupt memory.

this first showed up with the oregon scientific stations with loggers, but it can happen on fine offset stations too.

try clearing your station's logger.

m

Ian Prescott

unread,
May 19, 2019, 12:37:58 AM5/19/19
to weewx-user
Hi Mathew
used wee_device --clear-memory
appears to have cleared memory according to console display
then restarted weewx
the following is a c&p from the log

May 19 14:24:03 weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun May 19 14:25:33 2019 [try http://www.rsyslog.com/e/2007 ]
May 19 14:24:04 weatherpi wee_device[4443]: fousb: driver version is 1.9
May 19 14:24:04 weatherpi wee_device[4443]: fousb: power cycling enabled for port 4 on hub 001:004
May 19 14:24:04 weatherpi wee_device[4443]: fousb: polling mode is PERIODIC
May 19 14:24:04 weatherpi wee_device[4443]: fousb: polling interval is 60
May 19 14:24:04 weatherpi wee_device[4443]: fousb: found station on USB bus=001 device=011
May 19 14:24:47 weatherpi systemd[1]: Starting LSB: weewx weather system...
May 19 14:24:48 weatherpi weewx[4480]: engine: Initializing weewx version 3.9.1
May 19 14:24:48 weatherpi weewx[4480]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) #012[GCC 4.9.2]
May 19 14:24:48 weatherpi weewx[4480]: engine: Platform Linux-4.14.78-v7+-armv7l-with-debian-8.0
May 19 14:24:48 weatherpi weewx[4480]: engine: Locale is 'en_AU.UTF-8'
May 19 14:24:48 weatherpi weewx[4480]: engine: pid file is /var/run/weewx.pid
May 19 14:24:48 weatherpi weewx[4470]: Starting weewx weather system: weewx.
May 19 14:24:48 weatherpi systemd[1]: Started LSB: weewx weather system.
May 19 14:24:48 weatherpi weewx[4484]: engine: Using configuration file /etc/weewx/weewx.conf
May 19 14:24:48 weatherpi weewx[4484]: engine: Debug is 1
May 19 14:24:48 weatherpi weewx[4484]: engine: Initializing engine
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
May 19 14:24:48 weatherpi weewx[4484]: fousb: driver version is 1.9
May 19 14:24:48 weatherpi weewx[4484]: fousb: power cycling enabled for port 4 on hub 001:004
May 19 14:24:48 weatherpi weewx[4484]: fousb: polling mode is PERIODIC
May 19 14:24:48 weatherpi weewx[4484]: fousb: polling interval is 60
May 19 14:24:48 weatherpi weewx[4484]: fousb: found station on USB bus=001 device=011
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading service weewx.engine.StdTimeSynch
May 19 14:24:48 weatherpi weewx[4484]: engine: Finished loading service weewx.engine.StdTimeSynch
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading service weewx.engine.StdConvert
May 19 14:24:48 weatherpi weewx[4484]: engine: StdConvert target unit is 0x1
May 19 14:24:48 weatherpi weewx[4484]: engine: Finished loading service weewx.engine.StdConvert
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading service weewx.engine.StdCalibrate
May 19 14:24:48 weatherpi weewx[4484]: engine: Finished loading service weewx.engine.StdCalibrate
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading service weewx.engine.StdQC
May 19 14:24:48 weatherpi weewx[4484]: engine: Finished loading service weewx.engine.StdQC
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading service weewx.wxservices.StdWXCalculate
May 19 14:24:48 weatherpi weewx[4484]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
May 19 14:24:48 weatherpi weewx[4484]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
May 19 14:24:48 weatherpi weewx[4484]: engine: Finished loading service weewx.wxservices.StdWXCalculate
May 19 14:24:48 weatherpi weewx[4484]: engine: Loading service weewx.engine.StdArchive
May 19 14:24:48 weatherpi weewx[4484]: engine: Archive will use data binding wx_binding
May 19 14:24:48 weatherpi weewx[4484]: engine: Record generation will be attempted in 'software'
May 19 14:24:48 weatherpi weewx[4484]: engine: Using archive interval of 300 seconds (software record generation)
May 19 14:24:48 weatherpi weewx[4484]: engine: Use LOOP data in hi/low calculations: 1
May 19 14:24:48 weatherpi weewx[4484]: manager: Daily summary version is 2.0
May 19 14:24:48 weatherpi weewx[4484]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
May 19 14:24:48 weatherpi weewx[4484]: manager: Starting backfill of daily summaries
May 19 14:24:48 weatherpi weewx[4484]: engine: Caught unrecoverable exception in engine:
May 19 14:24:48 weatherpi weewx[4484]:     ****  Non-positive value for record field 'interval': 0
May 19 14:24:48 weatherpi weewx[4484]:     ****  Traceback (most recent call last):
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/engine.py", line 884, in main
May 19 14:24:48 weatherpi weewx[4484]:     ****      engine = engine_class(config_dict)
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/engine.py", line 78, in __init__
May 19 14:24:48 weatherpi weewx[4484]:     ****      self.loadServices(config_dict)
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/engine.py", line 142, in loadServices
May 19 14:24:48 weatherpi weewx[4484]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/engine.py", line 500, in __init__
May 19 14:24:48 weatherpi weewx[4484]:     ****      self.setup_database(config_dict)
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/engine.py", line 617, in setup_database
May 19 14:24:48 weatherpi weewx[4484]:     ****      _nrecs, _ndays = dbmanager.backfill_day_summary() # @UnusedVariable
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1469, in backfill_day_summary
May 19 14:24:48 weatherpi weewx[4484]:     ****      weight = self._calc_weight(rec)
May 19 14:24:48 weatherpi weewx[4484]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1582, in _calc_weight
May 19 14:24:48 weatherpi weewx[4484]:     ****      raise ValueError("Non-positive value for record field 'interval': %s" % (record['interval'], ))
May 19 14:24:48 weatherpi weewx[4484]:     ****  ValueError: Non-positive value for record field 'interval': 0
May 19 14:24:48 weatherpi weewx[4484]:     ****  Exiting.




--
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.

mwall

unread,
May 19, 2019, 5:17:30 AM5/19/19
to weewx-user
ian,

please try the following modification.  in the file fousb.py, change line 1321 from this:

                while dts > dt and count < num_rec:
                    raw_data = self.get_raw_data(ptr)
                    data = self.decode(raw_data)
                    if data['delay'] is None or data['delay'] > 30:
                        logerr('invalid data in get_records at 0x%04x, %s' %
                               (ptr, dts.isoformat()))
                        dts -= datetime.timedelta(minutes=fixed_block['read_period'])

to this:

                while dts > dt and count < num_rec:
                    raw_data = self.get_raw_data(ptr)
                    data = self.decode(raw_data)
                    if data['delay'] is None or data['delay'] < 1 or data['delay'] > 30:
                        logerr('invalid data in get_records at 0x%04x, %s' %
                               (ptr, dts.isoformat()))
                        dts -= datetime.timedelta(minutes=fixed_block['read_period'])

then restart weewx

m

mwall

unread,
May 19, 2019, 5:22:20 AM5/19/19
to weewx-user
you must also purge your database of any non-positive values for 'interval'.  as tom posted in this thread:
You may have to install the tool sqlite3, if you haven't already:
sudo apt-get install sqlite3

Then delete any non-positive values:
sudo sqlite3 /var/lib/weewx/weewx.sdb
sqlite> delete from archive where interval <= 0;


m

Ian Prescott

unread,
May 19, 2019, 5:53:34 AM5/19/19
to weewx-user
Thanks Mathew
The code change has been done  
database checked first then purged.........................appears to have done the trick.
fyi.....just a couple of rather old entries

sqlite> select dateTime, datetime(dateTime,'unixepoch','localtime'), interval from archive WHERE interval <= 0 order by dateTime;

1508786399|2017-10-24 05:19:59|0

1508935799|2017-10-25 22:49:59|0

sqlite>





--
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.
Reply all
Reply to author
Forward
0 new messages