Re: [weewx-user] WeeWX keeps crashing

2020-05-30 Thread Tom Keffer
No reason to upgrade unless you want to use Python 3.

It appears that you used the setup.py install method. If your RPi is
running Stretch or Buster, upgrading is pretty easy. Just follow the
directions: http://www.weewx.com/docs/setup.htm. If it's an older version,
you might have to work harder getting the pre-requisites installed.

-tk

On Sat, May 30, 2020 at 6:36 PM  wrote:

> Thanks Tom for that info. As soon as you told me that, I knew exactly what
> tables to fix. I had an some bad data this morning that I fixed. Instead on
> putting a 0 in its place I just nulled it out. I is now back up and running
> all of the way with all of my data?
>
>
>
> Since I am running an old version of weewx 3.9.1, how old will it be to
> upgrade to the latest? What steps would I take to do that?
>
>
>
> Thanks
>
> Dave
>
>
>
> *From:* weewx-user@googlegroups.com  *On
> Behalf Of *Tom Keffer
> *Sent:* Saturday, May 30, 2020 6:45 PM
> *To:* weewx-user 
> *Subject:* Re: [weewx-user] WeeWX keeps crashing
>
>
>
> I would guess that the column 'sum' in one of the daily summaries now has
> a value of "null" instead of 0. If you have a good idea which table it is
> (there are dozens!), you could search for it. For example:
>
>
>
> *sqlite3 weewx.sdb*
>
> sqlite> *select dateTime, sum from archive_day_rain where sum=null;*
>
>
>
> But, if you don't know which table, this could get pretty tedious.
>
>
>
> Fortunately, you have a backup, right? ☺
>
>
>
> -tk
>
>
>
> On Sat, May 30, 2020 at 5:35 PM  wrote:
>
> Ok. I did a little bit more troubleshooting on this and it appears that I
> have a database corruption. I took a backup of my existing database for
> weewx which is on MySQL. Let it recreate the database and now it is stable.
>
>
>
> Is there a way for weewx to repair the database so that I don’t loose all
> of my data?
>
>
>
> When I ran python –version is came back as Python 2.7.13
>
>
>
> Dave
>
>
>
> *From:* weewx-user@googlegroups.com  *On
> Behalf Of *John Kline
> *Sent:* Saturday, May 30, 2020 6:32 PM
> *To:* weewx-user@googlegroups.com
> *Subject:* Re: [weewx-user] WeeWX keeps crashing
>
>
>
> Did you change the default version of Python to 3?
>
>
>
> What is the output of:
>
> python —version
>
>
>
> On May 30, 2020, at 5:17 PM, dave.spicer2...@gmail.com wrote:
>
> 
>
> This morning, I noticed that I was not getting any data from WeeWX. I am
> running weewx ver 3.9.1 on a raspberry pi. I have reboot the raspberry pi
> to see if it would fix the issue but still nothing. When I look at that
> tail -f /var/log/syslog Here is the error that I am getting.
>
>
>
> May 30 18:07:46 raspberrypi weewx[467]: manager: Added record 2020-05-30
> 18:07:30 MDT (1590883650) to database 'weewx'
>
> May 30 18:07:46 raspberrypi weewx[467]: engine: Main loop exiting.
> Shutting engine down.
>
> May 30 18:07:46 raspberrypi weewx[467]: engine: Shutting down StdReport
> thread
>
> May 30 18:07:46 raspberrypi weewx[467]: engine: Caught unrecoverable
> exception in engine:
>
> May 30 18:07:46 raspberrypi weewx[467]:   unsupported operand
> type(s) for +=: 'NoneType' and 'float'
>
> May 30 18:07:46 raspberrypi weewx[467]:   Traceback (most recent
> call last):
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 890, in main
>
> May 30 18:07:46 raspberrypi weewx[467]:   engine.run()
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 202, in run
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
>
> May 30 18:07:46 raspberrypi weewx[467]:   callback(event)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 582, in post_loop
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self._software_catchup()
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 646, in _software_catchup
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
> record=record, origin='software'))
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
>
> May 30 18:07:46 raspberrypi weewx[467]:   

RE: [weewx-user] WeeWX keeps crashing

2020-05-30 Thread dave.spicer2012
Thanks Tom for that info. As soon as you told me that, I knew exactly what 
tables to fix. I had an some bad data this morning that I fixed. Instead on 
putting a 0 in its place I just nulled it out. I is now back up and running all 
of the way with all of my data?

 

Since I am running an old version of weewx 3.9.1, how old will it be to upgrade 
to the latest? What steps would I take to do that?

 

Thanks

Dave

 

From: weewx-user@googlegroups.com  On Behalf Of 
Tom Keffer
Sent: Saturday, May 30, 2020 6:45 PM
To: weewx-user 
Subject: Re: [weewx-user] WeeWX keeps crashing

 

I would guess that the column 'sum' in one of the daily summaries now has a 
value of "null" instead of 0. If you have a good idea which table it is (there 
are dozens!), you could search for it. For example:

 

sqlite3 weewx.sdb

sqlite> select dateTime, sum from archive_day_rain where sum=null;

 

But, if you don't know which table, this could get pretty tedious.

 

Fortunately, you have a backup, right? ☺

 

-tk

 

On Sat, May 30, 2020 at 5:35 PM mailto:dave.spicer2...@gmail.com> > wrote:

Ok. I did a little bit more troubleshooting on this and it appears that I have 
a database corruption. I took a backup of my existing database for weewx which 
is on MySQL. Let it recreate the database and now it is stable. 

 

Is there a way for weewx to repair the database so that I don’t loose all of my 
data?

 

When I ran python –version is came back as Python 2.7.13

 

Dave

 

From: weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com>  
mailto:weewx-user@googlegroups.com> > On Behalf 
Of John Kline
Sent: Saturday, May 30, 2020 6:32 PM
To: weewx-user@googlegroups.com <mailto:weewx-user@googlegroups.com> 
Subject: Re: [weewx-user] WeeWX keeps crashing

 

Did you change the default version of Python to 3?

 

What is the output of:

python —version

 

On May 30, 2020, at 5:17 PM, dave.spicer2...@gmail.com 
<mailto:dave.spicer2...@gmail.com>  wrote:



This morning, I noticed that I was not getting any data from WeeWX. I am 
running weewx ver 3.9.1 on a raspberry pi. I have reboot the raspberry pi to 
see if it would fix the issue but still nothing. When I look at that tail -f 
/var/log/syslog Here is the error that I am getting. 

 

May 30 18:07:46 raspberrypi weewx[467]: manager: Added record 2020-05-30 
18:07:30 MDT (1590883650) to database 'weewx'

May 30 18:07:46 raspberrypi weewx[467]: engine: Main loop exiting. Shutting 
engine down.

May 30 18:07:46 raspberrypi weewx[467]: engine: Shutting down StdReport thread

May 30 18:07:46 raspberrypi weewx[467]: engine: Caught unrecoverable exception 
in engine:

May 30 18:07:46 raspberrypi weewx[467]:   unsupported operand type(s) 
for +=: 'NoneType' and 'float'

May 30 18:07:46 raspberrypi weewx[467]:   Traceback (most recent call 
last):

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 890, in main

May 30 18:07:46 raspberrypi weewx[467]:   engine.run()

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 202, in run

May 30 18:07:46 raspberrypi weewx[467]:   
self.dispatchEvent(weewx.Event(weewx.POST_LOOP))

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent

May 30 18:07:46 raspberrypi weewx[467]:   callback(event)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 582, in post_loop

May 30 18:07:46 raspberrypi weewx[467]:   self._software_catchup()

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 646, in _software_catchup

May 30 18:07:46 raspberrypi weewx[467]:   
self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record, 
origin='software'))

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent

May 30 18:07:46 raspberrypi weewx[467]:   callback(event)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 601, in new_archive_record

May 30 18:07:46 raspberrypi weewx[467]:   
dbmanager.addRecord(event.record, accumulator=self.old_accumulator)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/manager.py", line 246, in addRecord

May 30 18:07:46 raspberrypi weewx[467]:   
self._addSingleRecord(record, cursor, log_level)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/manager.py", line 1216, in _addSingleRecord

May 30 18:07:46 raspberrypi weewx[467]:   
_day_summary.addRecord(record, weight=_weight)

May 30 18:07:46 raspberrypi weewx[467]: Fi

Re: [weewx-user] WeeWX keeps crashing

2020-05-30 Thread Tom Keffer
I would guess that the column 'sum' in one of the daily summaries now has a
value of "null" instead of 0. If you have a good idea which table it is
(there are dozens!), you could search for it. For example:

*sqlite3 weewx.sdb*
sqlite> *select dateTime, sum from archive_day_rain where sum=null;*

But, if you don't know which table, this could get pretty tedious.

Fortunately, you have a backup, right? ☺

-tk

On Sat, May 30, 2020 at 5:35 PM  wrote:

> Ok. I did a little bit more troubleshooting on this and it appears that I
> have a database corruption. I took a backup of my existing database for
> weewx which is on MySQL. Let it recreate the database and now it is stable.
>
>
>
> Is there a way for weewx to repair the database so that I don’t loose all
> of my data?
>
>
>
> When I ran python –version is came back as Python 2.7.13
>
>
>
> Dave
>
>
>
> *From:* weewx-user@googlegroups.com  *On
> Behalf Of *John Kline
> *Sent:* Saturday, May 30, 2020 6:32 PM
> *To:* weewx-user@googlegroups.com
> *Subject:* Re: [weewx-user] WeeWX keeps crashing
>
>
>
> Did you change the default version of Python to 3?
>
>
>
> What is the output of:
>
> python —version
>
>
>
> On May 30, 2020, at 5:17 PM, dave.spicer2...@gmail.com wrote:
>
> 
>
> This morning, I noticed that I was not getting any data from WeeWX. I am
> running weewx ver 3.9.1 on a raspberry pi. I have reboot the raspberry pi
> to see if it would fix the issue but still nothing. When I look at that
> tail -f /var/log/syslog Here is the error that I am getting.
>
>
>
> May 30 18:07:46 raspberrypi weewx[467]: manager: Added record 2020-05-30
> 18:07:30 MDT (1590883650) to database 'weewx'
>
> May 30 18:07:46 raspberrypi weewx[467]: engine: Main loop exiting.
> Shutting engine down.
>
> May 30 18:07:46 raspberrypi weewx[467]: engine: Shutting down StdReport
> thread
>
> May 30 18:07:46 raspberrypi weewx[467]: engine: Caught unrecoverable
> exception in engine:
>
> May 30 18:07:46 raspberrypi weewx[467]:   unsupported operand
> type(s) for +=: 'NoneType' and 'float'
>
> May 30 18:07:46 raspberrypi weewx[467]:   Traceback (most recent
> call last):
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 890, in main
>
> May 30 18:07:46 raspberrypi weewx[467]:   engine.run()
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 202, in run
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
>
> May 30 18:07:46 raspberrypi weewx[467]:   callback(event)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 582, in post_loop
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self._software_catchup()
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 646, in _software_catchup
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
> record=record, origin='software'))
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
>
> May 30 18:07:46 raspberrypi weewx[467]:   callback(event)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/engine.py", line 601, in new_archive_record
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/manager.py", line 246, in addRecord
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> self._addSingleRecord(record, cursor, log_level)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/manager.py", line 1216, in _addSingleRecord
>
> May 30 18:07:46 raspberrypi weewx[467]: 
> _day_summary.addRecord(record, weight=_weight)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/accum.py", line 256, in addRecord
>
> May 30 18:07:46 raspberrypi weewx[467]:   func(self, record,
> obs_type, add_hilo, weight)
>
> May 30 18:07:46 raspberrypi weewx[467]: File
> "/home/weewx/bin/weewx/accum.py", line 315, in add_value
>

RE: [weewx-user] WeeWX keeps crashing

2020-05-30 Thread dave.spicer2012
Ok. I did a little bit more troubleshooting on this and it appears that I have 
a database corruption. I took a backup of my existing database for weewx which 
is on MySQL. Let it recreate the database and now it is stable. 

 

Is there a way for weewx to repair the database so that I don’t loose all of my 
data?

 

When I ran python –version is came back as Python 2.7.13

 

Dave

 

From: weewx-user@googlegroups.com  On Behalf Of 
John Kline
Sent: Saturday, May 30, 2020 6:32 PM
To: weewx-user@googlegroups.com
Subject: Re: [weewx-user] WeeWX keeps crashing

 

Did you change the default version of Python to 3?

 

What is the output of:

python —version





On May 30, 2020, at 5:17 PM, dave.spicer2...@gmail.com 
<mailto:dave.spicer2...@gmail.com>  wrote:



This morning, I noticed that I was not getting any data from WeeWX. I am 
running weewx ver 3.9.1 on a raspberry pi. I have reboot the raspberry pi to 
see if it would fix the issue but still nothing. When I look at that tail -f 
/var/log/syslog Here is the error that I am getting. 

 

May 30 18:07:46 raspberrypi weewx[467]: manager: Added record 2020-05-30 
18:07:30 MDT (1590883650) to database 'weewx'

May 30 18:07:46 raspberrypi weewx[467]: engine: Main loop exiting. Shutting 
engine down.

May 30 18:07:46 raspberrypi weewx[467]: engine: Shutting down StdReport thread

May 30 18:07:46 raspberrypi weewx[467]: engine: Caught unrecoverable exception 
in engine:

May 30 18:07:46 raspberrypi weewx[467]:   unsupported operand type(s) 
for +=: 'NoneType' and 'float'

May 30 18:07:46 raspberrypi weewx[467]:   Traceback (most recent call 
last):

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 890, in main

May 30 18:07:46 raspberrypi weewx[467]:   engine.run()

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 202, in run

May 30 18:07:46 raspberrypi weewx[467]:   
self.dispatchEvent(weewx.Event(weewx.POST_LOOP))

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent

May 30 18:07:46 raspberrypi weewx[467]:   callback(event)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 582, in post_loop

May 30 18:07:46 raspberrypi weewx[467]:   self._software_catchup()

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 646, in _software_catchup

May 30 18:07:46 raspberrypi weewx[467]:   
self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record, 
origin='software'))

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent

May 30 18:07:46 raspberrypi weewx[467]:   callback(event)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/engine.py", line 601, in new_archive_record

May 30 18:07:46 raspberrypi weewx[467]:   
dbmanager.addRecord(event.record, accumulator=self.old_accumulator)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/manager.py", line 246, in addRecord

May 30 18:07:46 raspberrypi weewx[467]:   
self._addSingleRecord(record, cursor, log_level)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/manager.py", line 1216, in _addSingleRecord

May 30 18:07:46 raspberrypi weewx[467]:   
_day_summary.addRecord(record, weight=_weight)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/accum.py", line 256, in addRecord

May 30 18:07:46 raspberrypi weewx[467]:   func(self, record, 
obs_type, add_hilo, weight)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/accum.py", line 315, in add_value

May 30 18:07:46 raspberrypi weewx[467]:   
self[obs_type].addSum(val, weight=weight)

May 30 18:07:46 raspberrypi weewx[467]: File 
"/home/weewx/bin/weewx/accum.py", line 94, in addSum

May 30 18:07:46 raspberrypi weewx[467]:   self.sum += val

May 30 18:07:46 raspberrypi weewx[467]:   TypeError: unsupported 
operand type(s) for +=: 'NoneType' and 'float'

May 30 18:07:46 raspberrypi weewx[467]:   Exiting.

 

 

How do I get weewx working again?

 

Thanks

Dave

-- 
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 
<mailto:weewx-user+unsubscr...@googlegroups.com> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/008201d636e0%24ea6155b0%24bf2

Re: [weewx-user] WeeWX keeps crashing

2020-05-30 Thread John Kline
Did you change the default version of Python to 3?

What is the output of:
python —version

> On May 30, 2020, at 5:17 PM, dave.spicer2...@gmail.com wrote:
> 
> 
> This morning, I noticed that I was not getting any data from WeeWX. I am 
> running weewx ver 3.9.1 on a raspberry pi. I have reboot the raspberry pi to 
> see if it would fix the issue but still nothing. When I look at that tail -f 
> /var/log/syslog Here is the error that I am getting.
>  
> May 30 18:07:46 raspberrypi weewx[467]: manager: Added record 2020-05-30 
> 18:07:30 MDT (1590883650) to database 'weewx'
> May 30 18:07:46 raspberrypi weewx[467]: engine: Main loop exiting. Shutting 
> engine down.
> May 30 18:07:46 raspberrypi weewx[467]: engine: Shutting down StdReport thread
> May 30 18:07:46 raspberrypi weewx[467]: engine: Caught unrecoverable 
> exception in engine:
> May 30 18:07:46 raspberrypi weewx[467]:   unsupported operand type(s) 
> for +=: 'NoneType' and 'float'
> May 30 18:07:46 raspberrypi weewx[467]:   Traceback (most recent call 
> last):
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 890, in main
> May 30 18:07:46 raspberrypi weewx[467]:   engine.run()
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 202, in run
> May 30 18:07:46 raspberrypi weewx[467]:   
> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
> May 30 18:07:46 raspberrypi weewx[467]:   callback(event)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 582, in post_loop
> May 30 18:07:46 raspberrypi weewx[467]:   self._software_catchup()
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 646, in _software_catchup
> May 30 18:07:46 raspberrypi weewx[467]:   
> self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, 
> record=record, origin='software'))
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
> May 30 18:07:46 raspberrypi weewx[467]:   callback(event)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/engine.py", line 601, in new_archive_record
> May 30 18:07:46 raspberrypi weewx[467]:   
> dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/manager.py", line 246, in addRecord
> May 30 18:07:46 raspberrypi weewx[467]:   
> self._addSingleRecord(record, cursor, log_level)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/manager.py", line 1216, in _addSingleRecord
> May 30 18:07:46 raspberrypi weewx[467]:   
> _day_summary.addRecord(record, weight=_weight)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/accum.py", line 256, in addRecord
> May 30 18:07:46 raspberrypi weewx[467]:   func(self, record, 
> obs_type, add_hilo, weight)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/accum.py", line 315, in add_value
> May 30 18:07:46 raspberrypi weewx[467]:   
> self[obs_type].addSum(val, weight=weight)
> May 30 18:07:46 raspberrypi weewx[467]: File 
> "/home/weewx/bin/weewx/accum.py", line 94, in addSum
> May 30 18:07:46 raspberrypi weewx[467]:   self.sum += val
> May 30 18:07:46 raspberrypi weewx[467]:   TypeError: unsupported 
> operand type(s) for +=: 'NoneType' and 'float'
> May 30 18:07:46 raspberrypi weewx[467]:   Exiting.
>  
>  
> How do I get weewx working again?
>  
> Thanks
> Dave
> -- 
> 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/008201d636e0%24ea6155b0%24bf240110%24%40gmail.com.

-- 
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/F072F003-17DF-499E-A955-F357A4C34EEE%40johnkline.com.


Re: [weewx-user] weewx keeps crashing

2019-10-26 Thread Matt Frost
It's looking like the issue is resolved. Still no crash so far. Thanks 
again for the help.

-- 
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/b2f6c8ec-de54-42e3-86ff-a171a5903e9c%40googlegroups.com.


Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Matt Frost
OK I'm back up and running. I'll update tomorrow if I see the initial 
problem again or not. Thanks.

-- 
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/0c5832cf-71e5-43bf-8430-96f7dcede4b6%40googlegroups.com.


Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Thomas Keffer
Sorry. There are actually 4 places in accum.py that have to be changed.

Use the attached copy of accum.py

-tk



On Fri, Oct 25, 2019 at 6:20 PM Matt Frost  wrote:

> OK I made that change. Now I'm getting this. This errors out much quicker
> than before.
>
> Oct 25 20:15:15 weather weewx[783]: File
> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
> Oct 25 20:15:15 weather weewx[783]: 
> _day_summary.addRecord(record, weight=_weight)
> Oct 25 20:15:15 weather weewx[783]: File
> "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
> Oct 25 20:15:15 weather weewx[783]:   func(self, record, obs_type,
> add_hilo, weight)
> Oct 25 20:15:15 weather weewx[783]: File
> "/usr/share/weewx/weewx/accum.py", line 319, in add_value
> Oct 25 20:15:15 weather weewx[783]:   self[obs_type].addSum(val,
> weight=weight)
> Oct 25 20:15:15 weather weewx[783]: File
> "/usr/share/weewx/weewx/accum.py", line 95, in addSum
> Oct 25 20:15:15 weather weewx[783]:   "got type '%s' ('%s')" %
> (type(val), val))
> Oct 25 20:15:15 weather weewx[783]:   ValueError: accum:
> ScalarStats.addSum expected float or int, got type ''
> ('3840714016')
> Oct 25 20:15:15 weather weewx[783]:   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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/db4aeed6-10d3-46ab-9c2f-023289b78180%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zEAsHwV5WLiQG%3DXuFHxnNnGHYXZtqVgSRiXvgxeHTSU%3DTQ%40mail.gmail.com.
#
#Copyright (c) 2009-2016 Tom Keffer 
#
#See the file LICENSE.txt for your full rights.
#
"""Statistical accumulators. They accumulate the highs, lows, averages,
etc., of a sequence of records."""

import math

import configobj

import weewx

class OutOfSpan(ValueError):
"""Raised when attempting to add a record outside of the timespan held by an accumulator"""

#===
# ScalarStats
#===

class ScalarStats(object):
"""Accumulates statistics (min, max, average, etc.) for a scalar value.

Property 'last' is the last non-None value seen. Property 'lasttime' is
the time it was seen. """

default_init = (None, None, None, None, 0.0, 0, 0.0, 0)

def __init__(self, stats_tuple=None):
self.setStats(stats_tuple)
self.last = None
self.lasttime = None
 
def setStats(self, stats_tuple=None):
(self.min, self.mintime,
 self.max, self.maxtime,
 self.sum, self.count,
 self.wsum,self.sumtime) = stats_tuple if stats_tuple else ScalarStats.default_init
 
def getStatsTuple(self):
"""Return a stats-tuple. That is, a tuple containing the gathered statistics.
This tuple can be used to update the stats database"""
return (self.min, self.mintime, self.max, self.maxtime, 
self.sum, self.count, self.wsum, self.sumtime)

def mergeHiLo(self, x_stats):
"""Merge the highs and lows of another accumulator into myself."""
if x_stats.min is not None:
if self.min is None or x_stats.min < self.min:
self.min = x_stats.min
self.mintime = x_stats.mintime
if x_stats.max is not None:
if self.max is None or x_stats.max > self.max:
self.max = x_stats.max
self.maxtime = x_stats.maxtime
if x_stats.lasttime is not None:
if self.lasttime is None or x_stats.lasttime >= self.lasttime:
self.lasttime = x_stats.lasttime
self.last = x_stats.last

def mergeSum(self, x_stats):
"""Merge the sum and count of another accumulator into myself."""
self.sum += x_stats.sum
self.count   += x_stats.count
self.wsum+= x_stats.wsum
self.sumtime += x_stats.sumtime

def addHiLo(self, val, ts):
"""Include a scalar value in my highs and lows.
val: A scalar value
ts:  The timestamp.
"""
if val is not None:
# Check for non-numbers and for NaN
if not isinstance(val, (float, int, long)) or val != val:

Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Matt Frost
OK I made that change. Now I'm getting this. This errors out much quicker 
than before.

Oct 25 20:15:15 weather weewx[783]: File 
"/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
Oct 25 20:15:15 weather weewx[783]:   
_day_summary.addRecord(record, weight=_weight)
Oct 25 20:15:15 weather weewx[783]: File 
"/usr/share/weewx/weewx/accum.py", line 260, in addRecord
Oct 25 20:15:15 weather weewx[783]:   func(self, record, obs_type, 
add_hilo, weight)
Oct 25 20:15:15 weather weewx[783]: File 
"/usr/share/weewx/weewx/accum.py", line 319, in add_value
Oct 25 20:15:15 weather weewx[783]:   self[obs_type].addSum(val, 
weight=weight)
Oct 25 20:15:15 weather weewx[783]: File 
"/usr/share/weewx/weewx/accum.py", line 95, in addSum
Oct 25 20:15:15 weather weewx[783]:   "got type '%s' ('%s')" % 
(type(val), val))
Oct 25 20:15:15 weather weewx[783]:   ValueError: accum: 
ScalarStats.addSum expected float or int, got type '' 
('3840714016')
Oct 25 20:15:15 weather weewx[783]:   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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/db4aeed6-10d3-46ab-9c2f-023289b78180%40googlegroups.com.


Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Matt Frost
I have not but will try that next and let you know the results.

>
>>

-- 
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/7fb7e1d1-008d-463b-8c81-15e11c31e9f6%40googlegroups.com.


Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Thomas Keffer
I can imagine you don't want to sit there staring at the command line
looking for an 'L' for a few hours. :-)

Did you try the modification I outlined earlier? That should at least make
it go away.

-tk



On Fri, Oct 25, 2019 at 4:10 PM Matt Frost  wrote:

> I have not had any luck finding the bad data. Unfortunately it takes
> several hours for it to crash when running normally. I left weewx running
> from command line since last evening but it is still running. I assumed it
> would terminate if it found a bad value again but maybe that was not a
> valid assumption.
>
> --
> 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/9a366392-b353-4c23-80bb-5f5f98fbdf89%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zEAPW-WDrSDzwDoZY0FYb_vH4sZGmW3G0Td7Y8FG18cFSw%40mail.gmail.com.


Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Matt Frost
I have not had any luck finding the bad data. Unfortunately it takes 
several hours for it to crash when running normally. I left weewx running 
from command line since last evening but it is still running. I assumed it 
would terminate if it found a bad value again but maybe that was not a 
valid assumption.

-- 
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/9a366392-b353-4c23-80bb-5f5f98fbdf89%40googlegroups.com.


Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Thomas Keffer
Speaking of which, and I may regret saying this, but I don't see any reason
why the filter on types acceptable to the accumulator can't be broadened to
include 'long'. If you add a long to an int, you get a long, without a
TypeError.

So, another alternative is to change the code from this:

if val is not None:
# Check for non-numbers and for NaN
if not isinstance(val, (float, int)) or val != val:
raise ValueError("accum: ScalarStats.addHiLo expected float or int, "
 "got type '%s' ('%s')" % (type(val), val))


to this:

if val is not None:
# Check for non-numbers and for NaN
if not isinstance(val, (float, int, long)) or val != val:
raise ValueError("accum: ScalarStats.addHiLo expected float,
int, or long; "
 "got type '%s' ('%s')" % (type(val), val))


NB: This will all be changing in V4, which will definitely allow longs (as
well as strings!).

-tk

On Fri, Oct 25, 2019 at 5:21 AM Thomas Keffer  wrote:

> That would be the next step: instrument accum.py to show what's tripping
> it up.
>
> Matt, have you been successful in finding the 'long' data?
>
> -tk
>
> On Fri, Oct 25, 2019 at 3:47 AM gjr80  wrote:
>
>> Tom,
>>
>> This is the second issue of this type I am aware of and whilst cmon was
>> the source for both, on the basis of the OP it appears they are from
>> different sources within cmon. As WeeWX can be fed with all manner of
>> sources is it worth a try..except in the add_value() method to catch the
>> ValueError and report the miscreant field?
>>
>> Gary
>>
>> On Friday, 25 October 2019 10:17:18 UTC+10, Thomas Keffer wrote:
>>>
>>> Hello,
>>>
>>> My best guess is that somewhere among the myriad of things that cmon
>>> measures is something that is of type 'long', but it's hard to say with
>>> only a small snippet of the log.
>>>
>>> Try running weewx directly from the command line, and watching the
>>> values go by. If something is of type long, it will be marked with an 'L'.
>>> E.g., 123456L.
>>>
>>> -tk
>>>
>>> On Thu, Oct 24, 2019 at 4:48 PM Matt Frost  wrote:
>>>
 I upgraded to weewx 3.9.2 a few months back. Everything was fine for
 awhile but then several weeks ago weewx started crashing. Here is what I
 currently see:

 pi@weather:~ $ sudo /etc/init.d/weewx status
 ● weewx.service - LSB: weewx weather system
Loaded: loaded (/etc/init.d/weewx)
Active: active (exited) since Wed 2019-10-23 17:27:22 CDT; 24h ago
   Process: 425 ExecStart=/etc/init.d/weewx start (code=exited,
 status=0/SUCCESS)
 Oct 24 09:05:15 weather weewx[758]: File
 "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
 Oct 24 09:05:15 weather weewx[758]: 
 _day_summary.addRecord(record, weight=_weight)
 Oct 24 09:05:15 weather weewx[758]: File
 "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
 Oct 24 09:05:15 weather weewx[758]:   func(self, record,
 obs_type, add_hilo, weight)
 Oct 24 09:05:15 weather weewx[758]: File
 "/usr/share/weewx/weewx/accum.py", line 318, in add_value
 Oct 24 09:05:15 weather weewx[758]: 
 self[obs_type].addHiLo(val, record['dateTime'])
 Oct 24 09:05:15 weather weewx[758]: File
 "/usr/share/weewx/weewx/accum.py", line 78, in addHiLo
 Oct 24 09:05:15 weather weewx[758]:   "got type '%s' ('%s')" %
 (type(val), val))
 Oct 24 09:05:15 weather weewx[758]:   ValueError: accum:
 ScalarStats.addHiLo expected float or int, got type ''
 ('3840714016')
 Oct 24 09:05:15 weather weewx[758]:   Exiting.
 pi@weather:~ $

 I found a couple of posts online regarding an issue in cmon that
 sounded like the same issue I am seeing and applied these fixes:

 456 if k in self.last_net[iface]:
 457 x = int(values[i]) -
 self.last_net[iface][k]
 458 if x < 0:
 459 maxcnt = 0x1 # 32-bit
 counter
 460 if x + maxcnt < 0:
 461 maxcnt =
 0x1 # 64-bit counter
 462 x += maxcnt
 463 if x > 2147483648:
 464 x = 2147483648
 465 record['net_' + iface + '_' + k] =
 int(x)

 Unfortunately I still have the same issue. weewx will run for a few
 hours and crash again. Restarting weewx does not work I have to reboot my
 pi to get weewx to start again and run for a few more hours.

 Any help is appreciated.

 --
 You received this message because you are subscribed to the Google
 Groups "weewx-user" group.
 To unsubscribe from this group and stop receiving emails 

Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread Thomas Keffer
That would be the next step: instrument accum.py to show what's tripping it
up.

Matt, have you been successful in finding the 'long' data?

-tk

On Fri, Oct 25, 2019 at 3:47 AM gjr80  wrote:

> Tom,
>
> This is the second issue of this type I am aware of and whilst cmon was
> the source for both, on the basis of the OP it appears they are from
> different sources within cmon. As WeeWX can be fed with all manner of
> sources is it worth a try..except in the add_value() method to catch the
> ValueError and report the miscreant field?
>
> Gary
>
> On Friday, 25 October 2019 10:17:18 UTC+10, Thomas Keffer wrote:
>>
>> Hello,
>>
>> My best guess is that somewhere among the myriad of things that cmon
>> measures is something that is of type 'long', but it's hard to say with
>> only a small snippet of the log.
>>
>> Try running weewx directly from the command line, and watching the values
>> go by. If something is of type long, it will be marked with an 'L'. E.g.,
>> 123456L.
>>
>> -tk
>>
>> On Thu, Oct 24, 2019 at 4:48 PM Matt Frost  wrote:
>>
>>> I upgraded to weewx 3.9.2 a few months back. Everything was fine for
>>> awhile but then several weeks ago weewx started crashing. Here is what I
>>> currently see:
>>>
>>> pi@weather:~ $ sudo /etc/init.d/weewx status
>>> ● weewx.service - LSB: weewx weather system
>>>Loaded: loaded (/etc/init.d/weewx)
>>>Active: active (exited) since Wed 2019-10-23 17:27:22 CDT; 24h ago
>>>   Process: 425 ExecStart=/etc/init.d/weewx start (code=exited,
>>> status=0/SUCCESS)
>>> Oct 24 09:05:15 weather weewx[758]: File
>>> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
>>> Oct 24 09:05:15 weather weewx[758]: 
>>> _day_summary.addRecord(record, weight=_weight)
>>> Oct 24 09:05:15 weather weewx[758]: File
>>> "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
>>> Oct 24 09:05:15 weather weewx[758]:   func(self, record,
>>> obs_type, add_hilo, weight)
>>> Oct 24 09:05:15 weather weewx[758]: File
>>> "/usr/share/weewx/weewx/accum.py", line 318, in add_value
>>> Oct 24 09:05:15 weather weewx[758]: 
>>> self[obs_type].addHiLo(val, record['dateTime'])
>>> Oct 24 09:05:15 weather weewx[758]: File
>>> "/usr/share/weewx/weewx/accum.py", line 78, in addHiLo
>>> Oct 24 09:05:15 weather weewx[758]:   "got type '%s' ('%s')" %
>>> (type(val), val))
>>> Oct 24 09:05:15 weather weewx[758]:   ValueError: accum:
>>> ScalarStats.addHiLo expected float or int, got type ''
>>> ('3840714016')
>>> Oct 24 09:05:15 weather weewx[758]:   Exiting.
>>> pi@weather:~ $
>>>
>>> I found a couple of posts online regarding an issue in cmon that sounded
>>> like the same issue I am seeing and applied these fixes:
>>>
>>> 456 if k in self.last_net[iface]:
>>> 457 x = int(values[i]) -
>>> self.last_net[iface][k]
>>> 458 if x < 0:
>>> 459 maxcnt = 0x1 # 32-bit
>>> counter
>>> 460 if x + maxcnt < 0:
>>> 461 maxcnt = 0x1
>>> # 64-bit counter
>>> 462 x += maxcnt
>>> 463 if x > 2147483648:
>>> 464 x = 2147483648
>>> 465 record['net_' + iface + '_' + k] =
>>> int(x)
>>>
>>> Unfortunately I still have the same issue. weewx will run for a few
>>> hours and crash again. Restarting weewx does not work I have to reboot my
>>> pi to get weewx to start again and run for a few more hours.
>>>
>>> Any help is appreciated.
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/6fda9f5c-cf54-44e0-b5a3-547eede77d94%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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/6aa05b54-fc25-442f-a356-3f86cf8859e8%40googlegroups.com
> 
> .
>

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

Re: [weewx-user] weewx keeps crashing

2019-10-25 Thread gjr80
Tom,

This is the second issue of this type I am aware of and whilst cmon was the 
source for both, on the basis of the OP it appears they are from different 
sources within cmon. As WeeWX can be fed with all manner of sources is it 
worth a try..except in the add_value() method to catch the ValueError and 
report the miscreant field?

Gary

On Friday, 25 October 2019 10:17:18 UTC+10, Thomas Keffer wrote:
>
> Hello,
>
> My best guess is that somewhere among the myriad of things that cmon 
> measures is something that is of type 'long', but it's hard to say with 
> only a small snippet of the log.
>
> Try running weewx directly from the command line, and watching the values 
> go by. If something is of type long, it will be marked with an 'L'. E.g., 
> 123456L.
>
> -tk
>
> On Thu, Oct 24, 2019 at 4:48 PM Matt Frost  > wrote:
>
>> I upgraded to weewx 3.9.2 a few months back. Everything was fine for 
>> awhile but then several weeks ago weewx started crashing. Here is what I 
>> currently see:
>>
>> pi@weather:~ $ sudo /etc/init.d/weewx status
>> ● weewx.service - LSB: weewx weather system
>>Loaded: loaded (/etc/init.d/weewx)
>>Active: active (exited) since Wed 2019-10-23 17:27:22 CDT; 24h ago
>>   Process: 425 ExecStart=/etc/init.d/weewx start (code=exited, 
>> status=0/SUCCESS)
>> Oct 24 09:05:15 weather weewx[758]: File 
>> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
>> Oct 24 09:05:15 weather weewx[758]:   
>> _day_summary.addRecord(record, weight=_weight)
>> Oct 24 09:05:15 weather weewx[758]: File 
>> "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
>> Oct 24 09:05:15 weather weewx[758]:   func(self, record, 
>> obs_type, add_hilo, weight)
>> Oct 24 09:05:15 weather weewx[758]: File 
>> "/usr/share/weewx/weewx/accum.py", line 318, in add_value
>> Oct 24 09:05:15 weather weewx[758]:   self[obs_type].addHiLo(val, 
>> record['dateTime'])
>> Oct 24 09:05:15 weather weewx[758]: File 
>> "/usr/share/weewx/weewx/accum.py", line 78, in addHiLo
>> Oct 24 09:05:15 weather weewx[758]:   "got type '%s' ('%s')" % 
>> (type(val), val))
>> Oct 24 09:05:15 weather weewx[758]:   ValueError: accum: 
>> ScalarStats.addHiLo expected float or int, got type '' 
>> ('3840714016')
>> Oct 24 09:05:15 weather weewx[758]:   Exiting.
>> pi@weather:~ $
>>
>> I found a couple of posts online regarding an issue in cmon that sounded 
>> like the same issue I am seeing and applied these fixes:
>>
>> 456 if k in self.last_net[iface]:
>> 457 x = int(values[i]) - 
>> self.last_net[iface][k]
>> 458 if x < 0:
>> 459 maxcnt = 0x1 # 32-bit 
>> counter
>> 460 if x + maxcnt < 0:
>> 461 maxcnt = 0x1 
>> # 64-bit counter
>> 462 x += maxcnt
>> 463 if x > 2147483648:
>> 464 x = 2147483648
>> 465 record['net_' + iface + '_' + k] = 
>> int(x)
>>
>> Unfortunately I still have the same issue. weewx will run for a few hours 
>> and crash again. Restarting weewx does not work I have to reboot my pi to 
>> get weewx to start again and run for a few more hours.
>>
>> Any help is appreciated.
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/6fda9f5c-cf54-44e0-b5a3-547eede77d94%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/6aa05b54-fc25-442f-a356-3f86cf8859e8%40googlegroups.com.


Re: [weewx-user] weewx keeps crashing

2019-10-24 Thread Thomas Keffer
Hello,

My best guess is that somewhere among the myriad of things that cmon
measures is something that is of type 'long', but it's hard to say with
only a small snippet of the log.

Try running weewx directly from the command line, and watching the values
go by. If something is of type long, it will be marked with an 'L'. E.g.,
123456L.

-tk

On Thu, Oct 24, 2019 at 4:48 PM Matt Frost  wrote:

> I upgraded to weewx 3.9.2 a few months back. Everything was fine for
> awhile but then several weeks ago weewx started crashing. Here is what I
> currently see:
>
> pi@weather:~ $ sudo /etc/init.d/weewx status
> ● weewx.service - LSB: weewx weather system
>Loaded: loaded (/etc/init.d/weewx)
>Active: active (exited) since Wed 2019-10-23 17:27:22 CDT; 24h ago
>   Process: 425 ExecStart=/etc/init.d/weewx start (code=exited,
> status=0/SUCCESS)
> Oct 24 09:05:15 weather weewx[758]: File
> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
> Oct 24 09:05:15 weather weewx[758]: 
> _day_summary.addRecord(record, weight=_weight)
> Oct 24 09:05:15 weather weewx[758]: File
> "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
> Oct 24 09:05:15 weather weewx[758]:   func(self, record, obs_type,
> add_hilo, weight)
> Oct 24 09:05:15 weather weewx[758]: File
> "/usr/share/weewx/weewx/accum.py", line 318, in add_value
> Oct 24 09:05:15 weather weewx[758]:   self[obs_type].addHiLo(val,
> record['dateTime'])
> Oct 24 09:05:15 weather weewx[758]: File
> "/usr/share/weewx/weewx/accum.py", line 78, in addHiLo
> Oct 24 09:05:15 weather weewx[758]:   "got type '%s' ('%s')" %
> (type(val), val))
> Oct 24 09:05:15 weather weewx[758]:   ValueError: accum:
> ScalarStats.addHiLo expected float or int, got type ''
> ('3840714016')
> Oct 24 09:05:15 weather weewx[758]:   Exiting.
> pi@weather:~ $
>
> I found a couple of posts online regarding an issue in cmon that sounded
> like the same issue I am seeing and applied these fixes:
>
> 456 if k in self.last_net[iface]:
> 457 x = int(values[i]) -
> self.last_net[iface][k]
> 458 if x < 0:
> 459 maxcnt = 0x1 # 32-bit
> counter
> 460 if x + maxcnt < 0:
> 461 maxcnt = 0x1 #
> 64-bit counter
> 462 x += maxcnt
> 463 if x > 2147483648:
> 464 x = 2147483648
> 465 record['net_' + iface + '_' + k] =
> int(x)
>
> Unfortunately I still have the same issue. weewx will run for a few hours
> and crash again. Restarting weewx does not work I have to reboot my pi to
> get weewx to start again and run for a few more hours.
>
> Any help is appreciated.
>
> --
> 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/6fda9f5c-cf54-44e0-b5a3-547eede77d94%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zECHtOS%3DeStR86A%2BAgBoRydZXNpicRxCuqTVgvZTGaWobA%40mail.gmail.com.