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
On May 30, 2020, at 5:17 PM, dave.sp...@gmail.com wrote:
--
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/008201d636e0%24ea6155b0%24bf240110%24%40gmail.com.
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
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/F072F003-17DF-499E-A955-F357A4C34EEE%40johnkline.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/017a01d636e3%2467499540%2435dcbfc0%24%40gmail.com.
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
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDPfAJK9fGPJ1PWomBoUcobp5VLj051OqivFyc7%3D1509A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/000e01d636eb%24ecc49910%24c64dcb30%24%40gmail.com.