Re: [weewx-user] Re: upgrade from 3.8.2 to 3.9.1 failure

2019-05-19 Thread Ian Prescott
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>




On Sun, 19 May 2019 at 19:22, mwall  wrote:

> you must also purge your database of any non-positive values for
> 'interval'.  as tom posted in this thread:
>
> https://groups.google.com/d/msg/weewx-user/69RvQnD_OQc/ZyF0_jZqAwAJ
>
>
> 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
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/739d93c6-616f-4db4-8458-46914e6c51b3%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAN84nRvixFfC9cmADoiCPOGdJ0jYF2VUC5XWi3xGPk9u9vOQ-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: upgrade from 3.8.2 to 3.9.1 failure

2019-05-19 Thread mwall
you must also purge your database of any non-positive values for 
'interval'.  as tom posted in this thread:

https://groups.google.com/d/msg/weewx-user/69RvQnD_OQc/ZyF0_jZqAwAJ


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

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/739d93c6-616f-4db4-8458-46914e6c51b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: upgrade from 3.8.2 to 3.9.1 failure

2019-05-19 Thread mwall
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

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/086a4699-1005-41b3-845b-85fd9586d1c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: upgrade from 3.8.2 to 3.9.1 failure

2019-05-18 Thread Ian Prescott
Hi Mathew
used wee_device --clear-memory
appears to have cleared memory according to console display
then restarted weewx
the following is a c 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