Or, cmon is reading a value from a /proc file, which are generally strings.
Most likely, the author forgot to convert to a float.

On Mon, May 6, 2019 at 4:05 PM gjr80 <gjroder...@gmail.com> wrote:

> So the error is arising from data coming from cmon and not the weather
> station:
>
> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
> "/usr/share/weewx/user/cmon.py", line 711, in save_data
> May  6 20:20:31 raspberrypi weewx[333]:     ****      self.dbm.addRecord(
> record)
>
> and
>
> Apr 25 19:00:32 raspberrypi weewx[331]: **** File
> "/usr/share/weewx/user/cmon.py", line 704, in new_archive_record
> Apr 25 19:00:32 raspberrypi weewx[331]: **** self.save_data(self.get_data(
> now, self.last_ts))
> Apr 25 19:00:32 raspberrypi weewx[331]: **** File
> "/usr/share/weewx/user/cmon.py", line 711, in save_data
> Apr 25 19:00:32 raspberrypi weewx[331]: **** self.dbm.addRecord(record)
>
>
> Judging by the 'numbers' involved I would hazard a guess that the routine 
> used by cmon to extract data from some files on the system is returning 
> something other than a float or an int. Judging by the numbers I would be 
> looking at the network traffic.
> I recall an earlier thread where network traffic figures being read by cmon 
> were too big for an int, though that would not appear to be the case here.
>
> Perhaps some details of what cmon version, what operating system and WeeWX 
> system hardware might help
>
> Gary
>
>
> On Tuesday, 7 May 2019 07:56:45 UTC+10, Redanman wrote:
>>
>> Weewx crashed again tonight with what seems to be the same root cause.
>> Here is the syslog just at the moment it crashed.  Again, looking at the
>> data, I cannot see any spurious text/numbers.  Out of interest, is accum.py
>> run every iteration of the engine or only on an interval?
>>
>> May  6 20:20:30 raspberrypi weewx[333]: interceptor: MainThread: raw
>> packet: {'wind_speed': 0.0, 'humidity_in': 43.0, 'temperature_in': 68.4,
>> 'barometer': 30.15, 'windchill': 46.9, 'dewpoint': 40.5, 'battery': 0.0,
>> 'humidity_out': 78.0, 'uv': 0.0, 'radiation': 0.15, 'rain': 0.0,
>> 'dateTime': 1557170426, 'temperature_out': 46.9, 'wind_dir': 143.0,
>> 'rain_total': 4.49, 'usUnits': 1, 'wind_gust': 0.0}
>> May  6 20:20:30 raspberrypi weewx[333]: interceptor: MainThread: mapped
>> packet: {'barometer': 30.15, 'windchill': 46.9, 'dewpoint': 40.5,
>> 'outHumidity': 78.0, 'UV': 0.0, 'radiation': 0.15, 'rain': 0.0, 'dateTime':
>> 1557170426, 'windDir': 143.0, 'outTemp': 46.9, 'windSpeed': 0.0,
>> 'txBatteryStatus': 0.0, 'inTemp': 68.4, 'windGust': 0.0, 'inHumidity':
>> 43.0, 'usUnits': 1}
>> May  6 20:20:30 raspberrypi weewx[333]: manager: Added record 2019-05-06
>> 20:20:31 BST (1557170431) to database 'cmon.sdb'
>> May  6 20:20:30 raspberrypi weewx[333]: engine: Main loop exiting.
>> Shutting engine down.
>> May  6 20:20:30 raspberrypi weewx[333]: engine: Shutting down StdReport
>> thread
>> May  6 20:20:30 raspberrypi weewx[333]: engine: StdReport thread has been
>> terminated
>> May  6 20:20:30 raspberrypi weewx[333]: restx: Shut down WOW thread.
>> May  6 20:20:30 raspberrypi weewx[333]: restx: Shut down PWSWeather
>> thread.
>> May  6 20:20:31 raspberrypi weewx[333]: restx: Shut down Wunderground-PWS
>> thread.
>> May  6 20:20:31 raspberrypi weewx[333]: restx: Shut down StationRegistry
>> thread.
>> May  6 20:20:31 raspberrypi weewx[333]: interceptor: MainThread: shutting
>> down server thread
>> May  6 20:20:31 raspberrypi weewx[333]: interceptor: MainThread: stop tcp
>> server
>> May  6 20:20:31 raspberrypi weewx[333]: engine: Caught unrecoverable
>> exception in engine:
>> May  6 20:20:31 raspberrypi weewx[333]:     ****  accum:
>> ScalarStats.addHiLo expected float or int, got 710464
>> May  6 20:20:31 raspberrypi weewx[333]:     ****  Traceback (most recent
>> call last):
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 890, in main
>> May  6 20:20:31 raspberrypi weewx[333]:     ****      engine.run()
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 202, in run
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
>> May  6 20:20:31 raspberrypi weewx[333]:     ****      callback(event)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 574, in post_loop
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self._software_catchup()
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 646, in _software_catchup
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
>> record=record, origin='software'))
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
>> May  6 20:20:31 raspberrypi weewx[333]:     ****      callback(event)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/user/cmon.py", line 704, in new_archive_record
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self.save_data(self.get_data(now, self.last_ts))
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/user/cmon.py", line 711, in save_data
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self.dbm.addRecord(record)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/manager.py", line 246, in addRecord
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self._addSingleRecord(record, cursor, log_level)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> _day_summary.addRecord(record, weight=_weight)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/accum.py", line 256, in addRecord
>> May  6 20:20:31 raspberrypi weewx[333]:     ****      func(self, record,
>> obs_type, add_hilo, weight)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/accum.py", line 314, in add_value
>> May  6 20:20:31 raspberrypi weewx[333]:     ****
>> self[obs_type].addHiLo(val, record['dateTime'])
>> May  6 20:20:31 raspberrypi weewx[333]:     ****    File
>> "/usr/share/weewx/weewx/accum.py", line 77, in addHiLo
>> May  6 20:20:31 raspberrypi weewx[333]:     ****      raise
>> ValueError("accum: ScalarStats.addHiLo expected float or int, got %s" % val)
>> May  6 20:20:31 raspberrypi weewx[333]:     ****  ValueError: accum:
>> ScalarStats.addHiLo expected float or int, got 710464
>> May  6 20:20:31 raspberrypi weewx[333]:     ****  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/2dd0aa29-f462-48bf-9f37-c3817c4ddd34%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/2dd0aa29-f462-48bf-9f37-c3817c4ddd34%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CAPq0zEC6FyXbZUyvnb0JMX38qnzT5FwO7i-M1Ymzeze-BDEUGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to