Tom, thanks for your help I'm up and running!!

On Wednesday, January 6, 2021 at 3:00:53 PM UTC-5 tke...@gmail.com wrote:

> Good heavens. That's a lot. I wonder where they all came from?
>
> No matter. Here's how to fix (and sorry for giving you the wrong path to 
> the database).
>
> # First stop weewx
> *sudo systemctl stop weewx*
>
> *cd /var/lib/weewx*
>
> # Make a backup:
> *sudo cp weewx.sdb weewx.sdb.backup*
>
> # Delete all records where interval equals zero:
> *sudo sqlite3 weewx.sdb*
> sqlite> *delete from archive where interval==0;*
> sqlite> *.quit*
>
> # Restart weewx
> *sudo systemctl start weewx*
>
> If you get this error again, there is something wrong with the 
> configuration of your system.
>
> -tk
>
>
> On Wed, Jan 6, 2021 at 11:17 AM Michael Sanphillipo <sanph...@gmail.com> 
> wrote:
>
>> Tom, here are my results. Please let me know what to do next. Thanks!
>>
>> /var/lib/weewx $ sqlite3 /var/lib/weewx/weewx.sdb
>> SQLite version 3.27.2 2019-02-25 16:06:06
>> Enter ".help" for usage hints.
>> sqlite> select dateTime, datetime(dateTime, 'unixepoch', 'localtime'), 
>> interval from archive where interval<=0;
>> 1527646827|2018-05-29 22:20:27|0
>> 1528167350|2018-06-04 22:55:50|0
>> 1528498208|2018-06-08 18:50:08|0
>> 1528514117|2018-06-08 23:15:17|0
>> 1529163904|2018-06-16 11:45:04|0
>> 1529250650|2018-06-17 11:50:50|0
>> 1529969403|2018-06-25 19:30:03|0
>> 1530019815|2018-06-26 09:30:15|0
>> 1530045606|2018-06-26 16:40:06|0
>> 1531475142|2018-07-13 05:45:42|0
>> 1531637727|2018-07-15 02:55:27|0
>> 1532338834|2018-07-23 05:40:34|0
>> 1532424936|2018-07-24 05:35:36|0
>> 1532451003|2018-07-24 12:50:03|0
>> 1532459736|2018-07-24 15:15:36|0
>> 1532470836|2018-07-24 18:20:36|0
>> 1532548520|2018-07-25 15:55:20|0
>> 1536048937|2018-09-04 04:15:37|0
>> 1536216049|2018-09-06 02:40:49|0
>> 1536282003|2018-09-06 21:00:03|0
>> 1536954915|2018-09-14 15:55:15|0
>> 1537301423|2018-09-18 16:10:23|0
>> 1537933226|2018-09-25 23:40:26|0
>> 1538572222|2018-10-03 09:10:22|0
>> 1538660412|2018-10-04 09:40:12|0
>> 1538750748|2018-10-05 10:45:48|0
>> 1538870425|2018-10-06 20:00:25|0
>> 1538878546|2018-10-06 22:15:46|0
>> 1538967014|2018-10-07 22:50:14|0
>> 1539012006|2018-10-08 11:20:06|0
>> 1539111014|2018-10-09 14:50:14|0
>> 1539128421|2018-10-09 19:40:21|0
>> 1539129900|2018-10-09 20:05:00|0
>> 1539179426|2018-10-10 09:50:26|0
>> 1539360622|2018-10-12 12:10:22|0
>> 1539397529|2018-10-12 22:25:29|0
>> 1539448534|2018-10-13 12:35:34|0
>> 1539869437|2018-10-18 09:30:37|0
>> 1540113330|2018-10-21 05:15:30|0
>> 1540530332|2018-10-26 01:05:32|0
>> 1541252127|2018-11-03 09:35:27|0
>> 1541906710|2018-11-10 22:25:10|0
>> 1542099614|2018-11-13 04:00:14|0
>> 1543282805|2018-11-26 20:40:05|0
>> 1543788916|2018-12-02 17:15:16|0
>> 1543792503|2018-12-02 18:15:03|0
>> 1543828523|2018-12-03 04:15:23|0
>> 1543838124|2018-12-03 06:55:24|0
>> 1544019616|2018-12-05 09:20:16|0
>> 1544168454|2018-12-07 02:40:54|0
>> 1544239551|2018-12-07 22:25:51|0
>> 1544372440|2018-12-09 11:20:40|0
>> 1544904031|2018-12-15 15:00:31|0
>> 1545071707|2018-12-17 13:35:07|0
>> 1545429933|2018-12-21 17:05:33|0
>> 1545432303|2018-12-21 17:45:03|0
>> 1546150235|2018-12-30 01:10:35|0
>> 1546475415|2019-01-02 19:30:15|0
>> 1546518003|2019-01-03 07:20:03|0
>> 1547684108|2019-01-16 19:15:08|0
>> 1547692525|2019-01-16 21:35:25|0
>> 1547745917|2019-01-17 12:25:17|0
>> 1547795720|2019-01-18 02:15:20|0
>> 1547847003|2019-01-18 16:30:03|0
>> 1547885706|2019-01-19 03:15:06|0
>> 1547921726|2019-01-19 13:15:26|0
>> 1548084634|2019-01-21 10:30:34|0
>> 1548111631|2019-01-21 18:00:31|0
>> 1548140733|2019-01-22 02:05:33|0
>> 1548149429|2019-01-22 04:30:29|0
>> 1548172814|2019-01-22 11:00:14|0
>> 1548200418|2019-01-22 18:40:18|0
>> 1548355828|2019-01-24 13:50:28|0
>> 1548435918|2019-01-25 12:05:18|0
>> 1548532233|2019-01-26 14:50:33|0
>> 1548746432|2019-01-29 02:20:32|0
>> 1548782434|2019-01-29 12:20:34|0
>> 1548838528|2019-01-30 03:55:28|0
>> 1548889502|2019-01-30 18:05:02|0
>> 1549086926|2019-02-02 00:55:26|0
>> 1549353629|2019-02-05 03:00:29|0
>> 1549419305|2019-02-05 21:15:05|0
>> 1549438213|2019-02-06 02:30:13|0
>> 1549454715|2019-02-06 07:05:15|0
>> 1549679405|2019-02-08 21:30:05|0
>> 1549784417|2019-02-10 02:40:17|0
>> 1549825526|2019-02-10 14:05:26|0
>> 1549830909|2019-02-10 15:35:09|0
>> 1549874404|2019-02-11 03:40:04|0
>> 1550099133|2019-02-13 18:05:33|0
>> 1550101539|2019-02-13 18:45:39|0
>> 1550187328|2019-02-14 18:35:28|0
>> 1550194210|2019-02-14 20:30:10|0
>> 1550291412|2019-02-15 23:30:12|0
>> 1550573420|2019-02-19 05:50:20|0
>> 1550820921|2019-02-22 02:35:21|0
>> 1550881824|2019-02-22 19:30:24|0
>> 1551015637|2019-02-24 08:40:37|0
>> 1552304140|2019-03-11 07:35:40|0
>> 1552354241|2019-03-11 21:30:41|0
>> 1552566905|2019-03-14 08:35:05|0
>> 1552827608|2019-03-17 09:00:08|0
>> 1552918802|2019-03-18 10:20:02|0
>> 1554167132|2019-04-01 21:05:32|0
>> 1554227428|2019-04-02 13:50:28|0
>> 1554549615|2019-04-06 07:20:15|0
>> 1554727516|2019-04-08 08:45:16|0
>> 1554934221|2019-04-10 18:10:21|0
>> 1560451800|2019-06-13 14:50:00|0
>> 1560578137|2019-06-15 01:55:37|0
>> 1560591346|2019-06-15 05:35:46|0
>> 1560690940|2019-06-16 09:15:40|0
>> 1560917091|2019-06-19 00:04:51|0
>> 1560917146|2019-06-19 00:05:46|0
>> 1561295409|2019-06-23 09:10:09|0
>> 1561377604|2019-06-24 08:00:04|0
>> 1561721120|2019-06-28 07:25:20|0
>> 1561729203|2019-06-28 09:40:03|0
>> 1561848012|2019-06-29 18:40:12|0
>> 1561851305|2019-06-29 19:35:05|0
>> 1563068443|2019-07-13 21:40:43|0
>> 1563411933|2019-07-17 21:05:33|0
>> 1591577408|2020-06-07 20:50:08|0
>> 1591585234|2020-06-07 23:00:34|0
>>
>>
>> On Wednesday, January 6, 2021 at 1:37:35 PM UTC-5 tke...@gmail.com wrote:
>>
>>> Do it from a terminal.
>>>
>>> For now, just do the very first select statement so we can see where we 
>>> stand:
>>>
>>> *sqlite3 /var/weewx/weedwx.sdb*
>>> sqlite> *select dateTime, datetime(dateTime, 'unixepoch', 'localtime'), 
>>> interval from archive where interval<=0;*
>>> sqlite> *.quit*
>>>
>>>
>>>
>>> On Wed, Jan 6, 2021 at 10:33 AM Michael Sanphillipo <sanph...@gmail.com> 
>>> wrote:
>>>
>>>> Tom, do I do this in terminal and do I enter it exactly as you have it 
>>>> listed above?
>>>>
>>>> On Wed, Jan 6, 2021 at 1:19 PM Tom Keffer <tke...@gmail.com> wrote:
>>>>
>>>>> The software is a little more hard-nosed about demanding valid values 
>>>>> for the field 'interval'. Somewhere in your database, you have a value of 
>>>>> zero for the archive interval length. To find them:
>>>>>
>>>>> *sqlite3 /var/weewx/weedwx.sdb*
>>>>> sqlite> *select dateTime, datetime(dateTime, 'unixepoch', 
>>>>> 'localtime'), interval from archive where interval<=0;*
>>>>>
>>>>> To delete them:
>>>>>
>>>>> sqlite> *delete from archive where interval<=0;*
>>>>>
>>>>> Alternatively, if you're confident you know what the correct value 
>>>>> should be (let's say it's 5 minutes);
>>>>>
>>>>> sqlite> *update archive set interval=5 where interval<=0;*
>>>>>
>>>>> -tk
>>>>>
>>>>> On Wed, Jan 6, 2021 at 9:49 AM Michael Sanphillipo <sanph...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> I upgraded today and received the following errors in my Syslog. Any 
>>>>>> help would be greatly appreciated.
>>>>>>
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1063] INFO __main__: Initializing 
>>>>>> weewx version 4.3.0
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1063] INFO __main__: Using Python 
>>>>>> 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1063] INFO __main__: Platform 
>>>>>> Linux-5.4.79-v7+-armv7l-with-debian-10.7
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1063] INFO __main__: Locale is 
>>>>>> 'en_US.UTF-8'
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1063] INFO __main__: PID file is 
>>>>>> /var/run/weewx.pid
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO __main__: Using 
>>>>>> configuration file /etc/weewx/weewx.conf
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO __main__: Debug is 0
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO weewx.engine: Loading 
>>>>>> station type AcuRite (weewx.drivers.acurite)
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO weewx.drivers.acurite: 
>>>>>> driver version is 0.4
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO weewx.engine: StdConvert 
>>>>>> target unit is 0x1
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1051]: Starting weewx weather 
>>>>>> system: weewx.
>>>>>> Jan  6 12:44:46 raspberrypi systemd[1]: Started LSB: weewx weather 
>>>>>> system.
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO weewx.manager: Daily 
>>>>>> summaries at V2.0. Patching to V3.0
>>>>>> Jan  6 12:44:46 raspberrypi weewx[1067] INFO weewx.manager: 
>>>>>> recalculate_weights: Using database 'weewx.sdb'
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__: Caught 
>>>>>> unrecoverable exception:
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>> Non-positive value for record field 'interval': 0
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>> Traceback (most recent call last):
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewxd", line 148, in main
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     engine = weewx.engine.StdEngine(config_dict)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/engine.py", line 93, in __init__
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     self.loadServices(config_dict)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/engine.py", line 161, in loadServices
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     obj = weeutil.weeutil.get_object(svc)(self, config_dict)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/wxservices.py", line 38, in __init__
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     self.db_manager = 
>>>>>> engine.db_binder.get_manager(data_binding=data_binding, initialize=True)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 534, in get_manager
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     self.manager_cache[data_binding] = open_manager(manager_dict, 
>>>>>> initialize)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 684, in open_manager
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     manager_dict['schema'])
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 164, in open_with_create
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     dbmanager = cls(connection, table_name=table_name, schema=schema)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 831, in __init__
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     self.patch_sums()
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 1255, in patch_sums
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     self.recalculate_weights(start_d=datetime.date(2020,6,1))
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 1182, in 
>>>>>> recalculate_weights
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     self._do_tranche(mark_d, end_of_tranche_d, weight_fn, progress_fn)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 1215, in _do_tranche
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     weight = weight_fn(self, rec)
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>   File "/usr/share/weewx/weewx/manager.py", line 1366, in _calc_weight
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>>     "Non-positive value for record field 'interval': %s" % 
>>>>>> (record['interval'],))
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>> weewx.manager.IntervalError: Non-positive value for record field 
>>>>>> 'interval': 0
>>>>>> Jan  6 12:44:52 raspberrypi weewx[1067] CRITICAL __main__:     ****  
>>>>>> 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+...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/weewx-user/45226679-4c2b-431b-9ee7-94ffe7b0b724n%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/weewx-user/45226679-4c2b-431b-9ee7-94ffe7b0b724n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to a topic in the 
>>>>> Google Groups "weewx-user" group.
>>>>> To unsubscribe from this topic, visit 
>>>>> https://groups.google.com/d/topic/weewx-user/cPTRWVE2lBE/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>> weewx-user+...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/weewx-user/CAPq0zEDgh-emK1xpZpxNEgrvtTSEEt1GkRAQbur%2BApOoMf6Qiw%40mail.gmail.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEDgh-emK1xpZpxNEgrvtTSEEt1GkRAQbur%2BApOoMf6Qiw%40mail.gmail.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+...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/CAAsGudo5T7TQv%3DRCuu22-jt5LWSDD_VSzAqgeGgUR28GPyAWvw%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/CAAsGudo5T7TQv%3DRCuu22-jt5LWSDD_VSzAqgeGgUR28GPyAWvw%40mail.gmail.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+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/921ddabc-0134-4c90-953d-559d337972e9n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/921ddabc-0134-4c90-953d-559d337972e9n%40googlegroups.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/c1b14699-e997-4e37-bcf7-1303afcd89a4n%40googlegroups.com.

Reply via email to