Crash on startup following 4.3.0 -> 4.5.1 update

55 views
Skip to first unread message

Steve Woodford

unread,
Apr 21, 2021, 6:08:11 AM4/21/21
to weewx-user
I attempted a WeeWX update this morning, from 4.3.0 to 4.5.1. It did not go well.

When the daemon is started, I see the following in the log file after about 10 seconds:

weewx[97779] CRITICAL __main__: Caught unrecoverable exception:
weewx[97779] CRITICAL __main__:     ****  could not convert string to float: ''
weewx[97779] CRITICAL __main__:     ****  Traceback (most recent call last):
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewxd", line 151, in main
weewx[97779] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/engine.py", line 93, in __init__
weewx[97779] CRITICAL __main__:     ****      self.loadServices(config_dict)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/engine.py", line 161, in loadServices
weewx[97779] CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self, config_dict)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/wxservices.py", line 91, in __init__
weewx[97779] CRITICAL __main__:     ****      self.db_manager = engine.db_binder.get_manager(data_binding=data_binding, initialize=True)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 584, in get_manager
weewx[97779] CRITICAL __main__:     ****      self.manager_cache[data_binding] = open_manager(manager_dict, initialize)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 732, in open_manager
weewx[97779] CRITICAL __main__:     ****      return manager_cls.open_with_create(manager_dict['database_dict'],
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 164, in open_with_create
weewx[97779] CRITICAL __main__:     ****      dbmanager = cls(connection, table_name=table_name, schema=schema)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 881, in __init__
weewx[97779] CRITICAL __main__:     ****      self.patch_sums()
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 1344, in patch_sums
weewx[97779] CRITICAL __main__:     ****      self.recalculate_weights(start_d=datetime.date(2020, 6, 1))
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 1262, in recalculate_weights
weewx[97779] CRITICAL __main__:     ****      self._do_tranche(mark_d, end_of_tranche_d, weight_fn, progress_fn)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/manager.py", line 1301, in _do_tranche
weewx[97779] CRITICAL __main__:     ****      day_accum.addRecord(rec, weight=weight)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/accum.py", line 436, in addRecord
weewx[97779] CRITICAL __main__:     ****      func(self, record, obs_type, add_hilo, weight)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/accum.py", line 495, in add_value
weewx[97779] CRITICAL __main__:     ****      self[obs_type].addHiLo(val, record['dateTime'])
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weewx/accum.py", line 168, in addHiLo
weewx[97779] CRITICAL __main__:     ****      val = to_float(val)
weewx[97779] CRITICAL __main__:     ****    File "/Volumes/Data1/Users/weewx/bin/weeutil/weeutil.py", line 1276, in to_float
weewx[97779] CRITICAL __main__:     ****      return float(x) if x is not None else None
weewx[97779] CRITICAL __main__:     ****  ValueError: could not convert string to float: ''
weewx[97779] CRITICAL __main__:     ****  Exiting.

Looks like it might be trying to fix the DB.

The DB worked fine with 4.3.0, and is originally from my previous WView installation.

Any idea what I might be doing wrong? Do I need to update via 4.4 instead?

Steve

Steve Woodford

unread,
Apr 21, 2021, 8:22:00 AM4/21/21
to weewx-user
> On 21 Apr 2021, at 11:08, 'Steve Woodford' via weewx-user <weewx...@googlegroups.com> wrote:
>
> I attempted a WeeWX update this morning, from 4.3.0 to 4.5.1. It did not go well.

Bad form replying to myself, but ...

After further investigation, it turned out to be due to an errant record in the DB. The record’s “ET” field was blank; neither NULL nor a valid float. Not sure how it got there, but using an sqlite editor and setting it back to NULL did the trick.

Steve

Reply all
Reply to author
Forward
0 new messages