Thanks, Tom! You've uncovered a bug that was not exercised by the test suites. I'll get something out later today.
On Tue, Dec 15, 2020 at 6:46 AM [email protected] <[email protected]> wrote: > Not sure exactly what info besides the below logs would be interesting, > but when I use 4.3.0b1 instead of 4.2.0, it fails. This is a non-critical > instance of weewx, so I am happy to help debug and try stuff.. > > using vt-dev > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > __main__: Initializing weewx version 4.3.0b1 > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > __main__: Using Python 3.6.9 (default, Oct 8 2020, 12:12:24) > [GCC 8.4.0] > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > __main__: Platform Linux-5.4.49+-x86_64-with-Ubuntu-18.04-bionic > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > __main__: Locale is 'en_US.UTF-8' > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > __main__: Using configuration file /home/weewx/weewx.conf > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > __main__: Debug is 1 > Dec 15 09:40:19 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > weewx.engine: Loading station type Vantage (weewx.drivers.vantage) > Dec 15 09:40:23 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > weewx.engine: StdConvert target unit is 0x1 > Dec 15 09:40:24 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > weewx.manager: Daily summaries at V2.0. Patching to V3.0 > Dec 15 09:40:24 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] INFO > weewx.manager: recalculate_weights: Using database 'weewx_vt_dev' > Daily summaries at V2.0. Patching to V3.0 > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: Caught unrecoverable exception: > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** not enough arguments for format string > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** Traceback (most recent call last): > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File > "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 238, in execute > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** query = query % args > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** TypeError: not enough arguments for format > string > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** During handling of the above exception, > another exception occurred: > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** Traceback (most recent call last): > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weedb/mysql.py", line > 52, in guarded_fn > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** return fn(*args, **kwargs) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weedb/mysql.py", line > 262, in execute > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self.cursor.execute(mysql_string, > tuple(sql_tuple)) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File > "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 240, in execute > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self.errorhandler(self, ProgrammingError, > str(m)) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File > "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 52, in > defaulterrorhandler > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** raise errorclass(errorvalue) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** _mysql_exceptions.ProgrammingError: not enough > arguments for format string > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** During handling of the above exception, > another exception occurred: > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** Traceback (most recent call last): > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "./bin/weewxd", line 148, in main > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** engine = > weewx.engine.StdEngine(config_dict) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line > 93, in __init__ > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self.loadServices(config_dict) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line > 161, in loadServices > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** obj = > weeutil.weeutil.get_object(svc)(self, config_dict) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/wxservices.py", > line 38, in __init__ > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self.db_manager = > engine.db_binder.get_manager(data_binding=data_binding, initialize=True) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 534, in get_manager > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self.manager_cache[data_binding] = > open_manager(manager_dict, initialize) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 684, in open_manager > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** manager_dict['schema']) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 164, in open_with_create > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** dbmanager = cls(connection, > table_name=table_name, schema=schema) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 831, in __init__ > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self.patch_sums() > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 1341, in patch_sums > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** > self.recalculate_weights(start_d=datetime.date(2020,6,1)) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 1178, in recalculate_weights > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self._do_tranche(mark_date, > end_of_tranche, progress_fn) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 1202, in _do_tranche > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self._do_scratch_reweight(timespan) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 1242, in _do_scratch_reweight > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** self._do_scratch_single(timespan, > obs_type, cursor) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weewx/manager.py", > line 1296, in _do_scratch_single > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** cursor.execute(update_sql, (start_ts, > stop_ts)) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** File "/home/weewx/bin/weedb/mysql.py", line > 61, in guarded_fn > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** raise klass(e) > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** weedb.DatabaseError: not enough arguments for > format string > Dec 15 09:40:30 weewx-deployment-vt-dev-576879b87d-8llg6 weewx[60] > CRITICAL __main__: **** Exiting. > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 238, in > execute > query = query % args > TypeError: not enough arguments for format string > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/home/weewx/bin/weedb/mysql.py", line 52, in guarded_fn > return fn(*args, **kwargs) > File "/home/weewx/bin/weedb/mysql.py", line 262, in execute > self.cursor.execute(mysql_string, tuple(sql_tuple)) > File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 240, in > execute > self.errorhandler(self, ProgrammingError, str(m)) > File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 52, > in defaulterrorhandler > raise errorclass(errorvalue) > _mysql_exceptions.ProgrammingError: not enough arguments for format string > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "./bin/weewxd", line 261, in <module> > main() > File "./bin/weewxd", line 148, in main > engine = weewx.engine.StdEngine(config_dict) > File "/home/weewx/bin/weewx/engine.py", line 93, in __init__ > self.loadServices(config_dict) > File "/home/weewx/bin/weewx/engine.py", line 161, in loadServices > obj = weeutil.weeutil.get_object(svc)(self, config_dict) > File "/home/weewx/bin/weewx/wxservices.py", line 38, in __init__ > self.db_manager = > engine.db_binder.get_manager(data_binding=data_binding, initialize=True) > File "/home/weewx/bin/weewx/manager.py", line 534, in get_manager > self.manager_cache[data_binding] = open_manager(manager_dict, > initialize) > File "/home/weewx/bin/weewx/manager.py", line 684, in open_manager > manager_dict['schema']) > File "/home/weewx/bin/weewx/manager.py", line 164, in open_with_create > dbmanager = cls(connection, table_name=table_name, schema=schema) > File "/home/weewx/bin/weewx/manager.py", line 831, in __init__ > self.patch_sums() > File "/home/weewx/bin/weewx/manager.py", line 1341, in patch_sums > self.recalculate_weights(start_d=datetime.date(2020,6,1)) > File "/home/weewx/bin/weewx/manager.py", line 1178, in > recalculate_weights > self._do_tranche(mark_date, end_of_tranche, progress_fn) > File "/home/weewx/bin/weewx/manager.py", line 1202, in _do_tranche > self._do_scratch_reweight(timespan) > File "/home/weewx/bin/weewx/manager.py", line 1242, in > _do_scratch_reweight > self._do_scratch_single(timespan, obs_type, cursor) > File "/home/weewx/bin/weewx/manager.py", line 1296, in _do_scratch_single > cursor.execute(update_sql, (start_ts, stop_ts)) > File "/home/weewx/bin/weedb/mysql.py", line 61, in guarded_fn > raise klass(e) > weedb.DatabaseError: not enough arguments for format string > > > On Monday, December 14, 2020 at 8:23:25 PM UTC-5 [email protected] wrote: > >> Docker image: mitct02/weewx:4.3.0b1 >> >> On Monday, December 14, 2020 at 11:25:12 AM UTC-5 Tom Keffer wrote: >> >>> This release includes an important bug fix, plus a few additions. >>> >>> I am particularly interested in the first item on the list: the >>> on-the-fly patch of the daily summaries to fix a V4.2 bug. This bug caused >>> the daily summaries to weight the sums improperly. The patch fixes them. It >>> should run on startup of weewxd, and take only a couple seconds. >>> >>> Available in the usual place: >>> http://weewx.com/downloads/development_versions/ >>> >>> -tk >>> >>> >>> CHANGES: >>> >>> Version 4.2.0 had a bug, which caused the sums in the daily summary to be >>> incorrectly calculated. This version includes a patch to fix the problem. It >>> runs once at startup. Fixes issue #623. >>> >>> Service weewx.wxxtypes.StdDelta was inadvertently left out of the list of >>> services to be run. Fortunately, it is not used. Yet. Added it back in. >>> >>> Added the "old" NWS algorithm as an option for calculating heat index. >>> >>> Changed how various undocumented parameters in [StdWXCalculate] are >>> specified. >>> The only one people are likely to have used is 'ignore_zero_wind'. Its name >>> has >>> changed to 'force_null', and it has been moved. See the Upgrading Guide. >>> >>> Documented the various [StdWXCalculate] options. >>> >>> Fixed corner case for windDir when using software record generation, >>> ignore_zero_wind=True, and windSpeed=0 for entire record interval. Now emits >>> last windDir value. >>> >>> Fixed problem when looking up stars with more than one word in their name. >>> Fixes issue #620. >>> >>> Fixed problem where wind gust direction is not available when using software >>> record generation. >>> >>> -- > You received this message because you are subscribed to the Google Groups > "weewx-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-development/ea415725-f7f7-4be5-b36c-5274bff744dan%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-development/ea415725-f7f7-4be5-b36c-5274bff744dan%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zED0wMaKLCFq4wqk%2Bi%2BxJAGd0v3zRjwJR2zOK3M4Nz8SYg%40mail.gmail.com.
