Weewx fails to start

43 views
Skip to first unread message

Ron Walker

unread,
Jun 25, 2020, 4:53:39 PM6/25/20
to weewx-user
Hi All,

I am using weewx 3.9.1 on a Raspberry pi.  Up until yesterday, the system was running fine.  I had stopped the pi yesterday to move it to a new location.  Today when I attempted to start the program, I get the following error and then it quits.  Any help pointing me in the right direction to a resolution would be greatly appreciated!

Error output:

Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 890, in main
    engine.run()
  File "/usr/share/weewx/weewx/engine.py", line 191, in run
    self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
  File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
    callback(event)
  File "/usr/share/weewx/weewx/engine.py", line 546, in new_loop_packet
    self.accumulator.addRecord(event.packet, add_hilo=self.loop_hilo)
  File "/usr/share/weewx/weewx/accum.py", line 256, in addRecord
    func(self, record, obs_type, add_hilo, weight)
  File "/usr/share/weewx/weewx/accum.py", line 315, in add_value
    self[obs_type].addSum(val, weight=weight)
  File "/usr/share/weewx/weewx/accum.py", line 93, in addSum
    raise ValueError("accum: ScalarStats.addSum expected float or int, got %s" % val)
ValueError: accum: ScalarStats.addSum expected float or int, got nan


Thanks in advance!! 

Tom Keffer

unread,
Jun 25, 2020, 5:22:07 PM6/25/20
to weewx-user
You're not giving us a lot of information about your system. 

In Python, a 'nan' ("not a number") is not returned by any function unless one of the inputs to the function is a nan. That means one of your sensors probably emitted a 'nan', either directly as a value (unlikely), or by emitting a string with the literal characters 'nan'. 

But, again, it's impossible to say anything without knowing more about your system.

I will add one thing: V4.x includes a protection against ingesting nans. Good reason to upgrade.

-tk



--
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/3da3a69c-7e1a-4a86-ae97-6b86adc7f028o%40googlegroups.com.

Ron Walker

unread,
Jun 25, 2020, 10:28:05 PM6/25/20
to weewx-user
Thanks for your reply.  The weather station consists of an arduino microcontroller reading sensors and sending data to the pi, which places it in a CSV file.  I'm using fileparse in weewx to read the file.  You were correct in your assessment!  I looked through the CSV file and found entries with a 'nan' value for my second temperature sensor, which was bad!  Replacing the sensor resolved the issue.

For future reference, what information should I include in a post like this?

Thanks again!


On Thursday, June 25, 2020 at 4:53:39 PM UTC-4, Ron Walker wrote:
Hi All,

I am using weewx 3.9.1 on a Raspberry pi.  Up until yesterday, the system was running fine.  I had stopped the pi yesterday to move it to a new location.  Today when I attempted to start the program, I get the following error and then it quits.  Any help pointing me in the right direction to a resolution would be greatly appreciated!

Error output:.
Reply all
Reply to author
Forward
0 new messages