I would guess that the column 'sum' in one of the daily summaries now has a
value of "null" instead of 0. If you have a good idea which table it is
(there are dozens!), you could search for it. For example:

*sqlite3 weewx.sdb*
sqlite> *select dateTime, sum from archive_day_rain where sum=null;*

But, if you don't know which table, this could get pretty tedious.

Fortunately, you have a backup, right? ☺

-tk

On Sat, May 30, 2020 at 5:35 PM <dave.spicer2...@gmail.com> wrote:

> 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
>
>
>
> *From:* weewx-user@googlegroups.com <weewx-user@googlegroups.com> *On
> Behalf Of *John Kline
> *Sent:* Saturday, May 30, 2020 6:32 PM
> *To:* weewx-user@googlegroups.com
> *Subject:* Re: [weewx-user] WeeWX keeps crashing
>
>
>
> Did you change the default version of Python to 3?
>
>
>
> What is the output of:
>
> python —version
>
>
>
> On May 30, 2020, at 5:17 PM, dave.spicer2...@gmail.com wrote:
>
> 
>
> 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
>
> --
> 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/008201d636e0%24ea6155b0%24bf240110%24%40gmail.com
> <https://groups.google.com/d/msgid/weewx-user/008201d636e0%24ea6155b0%24bf240110%24%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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/F072F003-17DF-499E-A955-F357A4C34EEE%40johnkline.com
> <https://groups.google.com/d/msgid/weewx-user/F072F003-17DF-499E-A955-F357A4C34EEE%40johnkline.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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/017a01d636e3%2467499540%2435dcbfc0%24%40gmail.com
> <https://groups.google.com/d/msgid/weewx-user/017a01d636e3%2467499540%2435dcbfc0%24%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPq0zEDPfAJK9fGPJ1PWomBoUcobp5VLj051OqivFyc7%3D1509A%40mail.gmail.com.

Reply via email to