weewx stopped with

122 views
Skip to first unread message

peter

unread,
Sep 7, 2019, 4:11:05 AM9/7/19
to weewx-user
weewx stopped this morning with an error I don't understand. I also doesn't want to start either.

Can some please advise what would be the cause?
I have Davis Vantage Vue + few other inputs from text files I log into database. This week I added logging of a big integer values into 'hail' field.

This is the status:
sep 07 10:00:55 weather weewx[447]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
sep
07 10:00:55 weather weewx[447]:     ****      _day_summary.addRecord(record, weight=_weight)
sep
07 10:00:55 weather weewx[447]:     ****    File "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
sep
07 10:00:55 weather weewx[447]:     ****      func(self, record, obs_type, add_hilo, weight)
sep
07 10:00:55 weather weewx[447]:     ****    File "/usr/share/weewx/weewx/accum.py", line 318, in add_value
sep
07 10:00:55 weather weewx[447]:     ****      self[obs_type].addHiLo(val, record['dateTime'])
sep
07 10:00:55 weather weewx[447]:     ****    File "/usr/share/weewx/weewx/accum.py", line 78, in addHiLo
sep
07 10:00:55 weather weewx[447]:     ****      "got type '%s' ('%s')" % (type(val), val))
sep
07 10:00:55 weather weewx[447]:     ****  ValueError: accum: ScalarStats.addHiLo expected float or int, got type '<type 'float'>' ('nan')
sep
07 10:00:55 weather weewx[447]:     ****  Exiting.

Thanks!

Steve Shuff

unread,
Sep 7, 2019, 5:14:35 AM9/7/19
to weewx...@googlegroups.com
Cancel
--
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/75ebceae-9bb1-40f8-8ef5-96b1cedaf1d0%40googlegroups.com.
Message has been deleted

peter

unread,
Sep 7, 2019, 1:49:53 PM9/7/19
to weewx-user
I've deleted the weewx.sdb and weewx.db files and restarted. Same error... I am completely lost...

Dne sobota, 07. september 2019 18.27.10 UTC+2 je oseba J D napisala:
Hi,
Looks like when you added your new data you have a nan (not a number) being put into the database. 
Check your changes to see to see if the large number is too large.
Need to see your changes to understand more.
Jerry
Cancel
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

peter

unread,
Sep 7, 2019, 2:09:05 PM9/7/19
to weewx-user
I've used the original database again and did a
wee_database weewx.conf --drop-daily

I got a full log which ends with the same error. I've also set the new columns to NULL value so there should be no NAN.

Sep  7 20:06:04 vremeSolkan weewx[4928]: engine: Starting up weewx version 3.9.2
Sep  7 20:06:04 vremeSolkan weewx[4928]: engine: Clock error is 0.95 seconds (positive is fast)
Sep  7 20:06:04 vremeSolkan weewx[4928]: manager: Added record 2019-09-07 06:33:00 CEST (1567830780) to database 'weewx.sdb'
Sep  7 20:06:04 vremeSolkan weewx[4928]: engine: Main loop exiting. Shutting engine down.
Sep  7 20:06:04 vremeSolkan weewx[4928]: engine: Caught unrecoverable exception in engine:
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****  accum: ScalarStats.addHiLo expected float or int, got type '<type 'float'>' ('nan')
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****  Traceback (most recent call last):
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 895, in main
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      engine.run()
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 161, in run
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 225, in dispatchEvent
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      callback(event)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 521, in startup
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      self._catchup(self.engine.console.genStartupRecords)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 636, in _catchup
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      origin='hardware'))
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 225, in dispatchEvent
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      callback(event)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/engine.py", line 602, in new_archive_record
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/manager.py", line 246, in addRecord
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      self._addSingleRecord(record, cursor, log_level)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1216, in _addSingleRecord
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      _day_summary.addRecord(record, weight=_weight)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/accum.py", line 260, in addRecord
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      func(self, record, obs_type, add_hilo, weight)
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/accum.py", line 318, in add_value
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      self[obs_type].addHiLo(val, record['dateTime'])
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****    File "/usr/share/weewx/weewx/accum.py", line 78, in addHiLo
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****      "got type '%s' ('%s')" % (type(val), val))
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****  ValueError: accum: ScalarStats.addHiLo expected float or int, got type '<type 'float'>' ('nan')
Sep  7 20:06:04 vremeSolkan weewx[4928]:     ****  Exiting.



Dne sobota, 07. september 2019 19.49.53 UTC+2 je oseba peter napisala:

peter

unread,
Sep 7, 2019, 4:58:03 PM9/7/19
to weewx-user
Found a solution. Long story short: temperature value read from a text file was 'inf'. Consequently, other recalculations failed and resulted in nan.
Solution: fix the temperature sensor :-)

Dne sobota, 07. september 2019 10.11.05 UTC+2 je oseba peter napisala:
Message has been deleted

Thomas Keffer

unread,
Nov 22, 2019, 7:56:11 AM11/22/19
to weewx-user
Most likely, the NaN will be in the input data stream, not the database. Did you look there?


On Fri, Nov 22, 2019 at 1:59 AM peter <pete...@gmail.com> wrote:
It happened again with exactly the same error. I've deleted (manually...) all 'Inf' values in one column but am unable to start weewx. It always exits with this message. I've looked for 'nan' values but there were no such entries.
I'd appreciate suggestions... Station type: Vantage Vue.

Dne sobota, 07. september 2019 20.09.05 UTC+2 je oseba peter napisala:
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/5c32d30b-5368-44ea-b4b3-65e581960659%40googlegroups.com.

peter

unread,
Nov 22, 2019, 8:00:29 AM11/22/19
to weewx-user
This was again my fault (same as in the original report). I haven't looked at all the files that feed the database. I found the 'nan' there and removed it. I've also improved the process that writes to these external files so no 'nan' should be written anymore.
Thanks for your help.

Dne petek, 22. november 2019 13.56.11 UTC+1 je oseba Thomas Keffer napisala:
Reply all
Reply to author
Forward
0 new messages