BobAtchley / weewx-ws6in1

weewx driver for the 6 in 1 PC weather station clones
GNU General Public License v3.0
5 stars 6 forks source link

Errors on startup #11

Closed sainio closed 3 years ago

sainio commented 3 years ago

--- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.8/logging/handlers.py", line 918, in emit msg = self.format(record) File "/usr/lib64/python3.8/logging/init.py", line 925, in format return fmt.format(record) File "/usr/lib64/python3.8/logging/init.py", line 664, in format record.message = record.getMessage() File "/usr/lib64/python3.8/logging/init.py", line 369, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "./bin/weewxd", line 264, in main() File "./bin/weewxd", line 151, in main engine = weewx.engine.StdEngine(config_dict) File "/home/weewx/bin/weewx/engine.py", line 81, in init self.setupStation(config_dict) File "/home/weewx/bin/weewx/engine.py", line 119, in setupStation self.console = loader_function(config_dict, self) File "/home/weewx/bin/user/ws6in1.py", line 390, in loader return ws6in1(**config_dict[DRIVER_NAME]) File "/home/weewx/bin/user/ws6in1.py", line 442, in init log.info("driver version is %s, Model is %s, Type is", DRIVER_VERSION, self.model, ws_type) Message: 'driver version is %s, Model is %s, Type is' Arguments: ('1.02', 'WS6in1', 'WS6IN1')

What could this be?

BobAtchley commented 3 years ago

This is unexpected. There is an obvious and blatant defect in the ws6in1 driver in that the log.info line has 3 arguments but only provides 2 "%s" to display the output, the third one is missing. When I start weewx I get no error but that log.info is not output - I just had not noticed before. You must be running a different version of python that is fussier (I'm using Python 3.7.3). This shouldn't cause weewx to close and is the last line in the ws6in1 constructor so should not have any effect - I will fix and provide a new version of the driver once we have got to the bottom of your other issue (just in case that is also a ws6in1 error)

sainio commented 3 years ago

I'm on Fedora 32, running with Python 3.8.7 Weewx version is 4.4.0

BobAtchley commented 3 years ago

I have corrected the defect and issued 1.03 of the WS6in1 driver. When I start weewx I now see the log.info as expected (so working in Python 3.7.3) Can you confirm this resolves the problem with Python 3.8.7.

sainio commented 3 years ago

Boots without errors on python 3.8.7 with new version! Thanks!