Re: [weewx-user] Weewx crashing with error associated with ScalarStats.addHiLo

2019-04-26 Thread Thomas Keffer
I suspect that "number" is actually a string, emitted, somehow, by the
interceptor code.

On Fri, Apr 26, 2019 at 6:40 AM Leon Shaner  wrote:

> Mike,
>
> That number doesn't look too big for type int on most modern day systems.
>  :-/
>
> I am on the same platform.  But my Raspian or python version could be
> different (I am on latest latest Raspian and python points to python2).
>
> See if you can follow along with these tests and report back if the
> results differ for you.
> Where I put cat, of course you need to edit those files and paste what I
> showed.
>
> pi@nixie:~ $ cat /var/tmp/maxsize.py
> import sys
> print sys.maxsize
> pi@nixie:~ $ python /var/tmp/maxsize.py
> 2147483647
> pi@nixie:~ $ python2 /var/tmp/maxsize.py
> 2147483647
> pi@nixie:~ $ python3 /var/tmp/maxsize.py
>   File "/var/tmp/maxsize.py", line 2
> print sys.maxsize
> ^
> SyntaxError: Missing parentheses in call to 'print'
> pi@nixie:~ $ cat /var/tmp/maxsize3.py
> import sys
> print (sys.maxsize)
> pi@nixie:~ $ python3 /var/tmp/maxsize3.py
> 2147483647
>
> Regards,
> Leon
> --
> Leon Shaner :: Dearborn, Michigan (iPhone)
>
> On Apr 26, 2019, at 6:57 AM, Redanman  wrote:
>
> Thank you for any possible insights into what might be causing Weewx to
> occasionally crash.  The relevant part of the syslog is :
>
> Apr 26 08:20:32 raspberrypi weewx[7715]: File
> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
> Apr 26 08:20:32 raspberrypi weewx[7715]: 
> _day_summary.addRecord(record, weight=_weight)
> Apr 26 08:20:32 raspberrypi weewx[7715]: File
> "/usr/share/weewx/weewx/accum.py", line 256, in addRecord
> Apr 26 08:20:32 raspberrypi weewx[7715]:   func(self, record,
> obs_type, add_hilo, weight)
> Apr 26 08:20:32 raspberrypi weewx[7715]: File
> "/usr/share/weewx/weewx/accum.py", line 314, in add_value
> Apr 26 08:20:32 raspberrypi weewx[7715]: 
> self[obs_type].addHiLo(val, record['dateTime'])
> Apr 26 08:20:32 raspberrypi weewx[7715]: File
> "/usr/share/weewx/weewx/accum.py", line 77, in addHiLo
> Apr 26 08:20:32 raspberrypi weewx[7715]:   raise
> ValueError("accum: ScalarStats.addHiLo expected float or int, got %s" % val)
> Apr 26 08:20:32 raspberrypi weewx[7715]:   ValueError: accum:
> ScalarStats.addHiLo expected float or int, got 645138
> Apr 26 08:20:32 raspberrypi weewx[7715]:   Exiting.
>
> I have Weewx running on a Raspberry Pi Zero and my weather station is an
> Aercus WeatherSleuth, so I am using the interceptor driver.  The
> installation was very stable until I upgraded to rev 3.9.1 a few weeks
> ago.  Now, every few days Weewx crashes on me.
>
> --
> 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.
> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Weewx crashing with error associated with ScalarStats.addHiLo

2019-04-26 Thread Leon Shaner
Mike,

That number doesn't look too big for type int on most modern day systems.  :-/

I am on the same platform.  But my Raspian or python version could be different 
(I am on latest latest Raspian and python points to python2).

See if you can follow along with these tests and report back if the results 
differ for you.
Where I put cat, of course you need to edit those files and paste what I showed.

pi@nixie:~ $ cat /var/tmp/maxsize.py
import sys
print sys.maxsize
pi@nixie:~ $ python /var/tmp/maxsize.py
2147483647
pi@nixie:~ $ python2 /var/tmp/maxsize.py
2147483647
pi@nixie:~ $ python3 /var/tmp/maxsize.py
  File "/var/tmp/maxsize.py", line 2
print sys.maxsize
^
SyntaxError: Missing parentheses in call to 'print'
pi@nixie:~ $ cat /var/tmp/maxsize3.py
import sys
print (sys.maxsize)
pi@nixie:~ $ python3 /var/tmp/maxsize3.py
2147483647

Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPhone)

> On Apr 26, 2019, at 6:57 AM, Redanman  wrote:
> 
> Thank you for any possible insights into what might be causing Weewx to 
> occasionally crash.  The relevant part of the syslog is :
> 
> Apr 26 08:20:32 raspberrypi weewx[7715]: File 
> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
> Apr 26 08:20:32 raspberrypi weewx[7715]:   
> _day_summary.addRecord(record, weight=_weight)
> Apr 26 08:20:32 raspberrypi weewx[7715]: File 
> "/usr/share/weewx/weewx/accum.py", line 256, in addRecord
> Apr 26 08:20:32 raspberrypi weewx[7715]:   func(self, record, 
> obs_type, add_hilo, weight)
> Apr 26 08:20:32 raspberrypi weewx[7715]: File 
> "/usr/share/weewx/weewx/accum.py", line 314, in add_value
> Apr 26 08:20:32 raspberrypi weewx[7715]:   
> self[obs_type].addHiLo(val, record['dateTime'])
> Apr 26 08:20:32 raspberrypi weewx[7715]: File 
> "/usr/share/weewx/weewx/accum.py", line 77, in addHiLo
> Apr 26 08:20:32 raspberrypi weewx[7715]:   raise 
> ValueError("accum: ScalarStats.addHiLo expected float or int, got %s" % val)
> Apr 26 08:20:32 raspberrypi weewx[7715]:   ValueError: accum: 
> ScalarStats.addHiLo expected float or int, got 645138
> Apr 26 08:20:32 raspberrypi weewx[7715]:   Exiting.
> 
> I have Weewx running on a Raspberry Pi Zero and my weather station is an 
> Aercus WeatherSleuth, so I am using the interceptor driver.  The installation 
> was very stable until I upgraded to rev 3.9.1 a few weeks ago.  Now, every 
> few days Weewx crashes on me.
> -- 
> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Weewx crashing with error associated with ScalarStats.addHiLo

2019-04-26 Thread Redanman
Thank you for any possible insights into what might be causing Weewx to 
occasionally crash.  The relevant part of the syslog is :

Apr 26 08:20:32 raspberrypi weewx[7715]: File 
"/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
Apr 26 08:20:32 raspberrypi weewx[7715]:   
_day_summary.addRecord(record, weight=_weight)
Apr 26 08:20:32 raspberrypi weewx[7715]: File 
"/usr/share/weewx/weewx/accum.py", line 256, in addRecord
Apr 26 08:20:32 raspberrypi weewx[7715]:   func(self, record, 
obs_type, add_hilo, weight)
Apr 26 08:20:32 raspberrypi weewx[7715]: File 
"/usr/share/weewx/weewx/accum.py", line 314, in add_value
Apr 26 08:20:32 raspberrypi weewx[7715]:   
self[obs_type].addHiLo(val, record['dateTime'])
Apr 26 08:20:32 raspberrypi weewx[7715]: File 
"/usr/share/weewx/weewx/accum.py", line 77, in addHiLo
Apr 26 08:20:32 raspberrypi weewx[7715]:   raise 
ValueError("accum: ScalarStats.addHiLo expected float or int, got %s" % val)
Apr 26 08:20:32 raspberrypi weewx[7715]:   ValueError: accum: 
ScalarStats.addHiLo expected float or int, got 645138
Apr 26 08:20:32 raspberrypi weewx[7715]:   Exiting.

I have Weewx running on a Raspberry Pi Zero and my weather station is an 
Aercus WeatherSleuth, so I am using the interceptor driver.  The 
installation was very stable until I upgraded to rev 3.9.1 a few weeks 
ago.  Now, every few days Weewx crashes on me.

-- 
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.
For more options, visit https://groups.google.com/d/optout.