Upgrade to version 4.1.1-1 from version 3 Fails to start

78 views
Skip to first unread message

themet...@gmail.com

unread,
Aug 23, 2020, 6:14:52 PM8/23/20
to weewx-user

I am running weewx on a Raspberry Pi upgrade using apt upgrade, and realise that it now runs on Python 3.
I have made sure that in the /etc/default/weewx I have python3.
I am using the new weewx.config with the relevant items for MySQL database and my Vantage Pro2 system as before.
I have installed various missing modules including python-serial, python3-configparser, python3-mysqldb, python3-pymysqld
I get this error:
Aug 23 20:04:41 picluster python3[22080]: weewx[22080] CRITICAL __main__:     ****    File "/usr/share/weewx/weedb/mysql.py", line 15, in <module>
Aug 23 20:04:41 picluster python3[22080]: weewx[22080] CRITICAL __main__:     ****      import pymysql as MySQLdb
Aug 23 20:04:41 picluster python3[22080]: weewx[22080] CRITICAL __main__:     ****  ImportError: No module named 'pymysql'
Aug 23 20:04:41 picluster python3[22080]: weewx[22080] CRITICAL __main__:     ****  Exiting.

But I have pymysql installed, If I go to a python3 prompt and issue this:
>>>import pymysql
It does not show an error, so why is weewx complaining??

OK, so I rebooted. Now I have an error which I did have before, then it disappeared:
Aug 23 22:05:13 picluster python3[5164]: weewx[5164] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1102, in get_object
Aug 23 22:05:13 picluster python3[5164]: weewx[5164] CRITICAL __main__:     ****      "Module '%s' has no attribute '%s' when searching for '%s'" % (mod.__name__, part, module_class))
Aug 23 22:05:13 picluster python3[5164]: weewx[5164] CRITICAL __main__:     ****  AttributeError: Module 'weewx.wxmanager' has no attribute 'WxDaySummaryManager' when searching for 'weewx.wxmanager.WxDaySummaryManager'
Aug 23 22:05:13 picluster python3[5164]: weewx[5164] CRITICAL __main__:     ****  Exiting.
This happens with all of the following settings in the [[wx_binding]] section
manager = weewx.manager.DaySummaryManager
# manager = weewx.manager.WxDaySummaryManager
# manager = weewx.wxmanager.WxDaySummaryManager
What is going on here? I should not have updated the system...... Grrrr!!!!

gjr80

unread,
Aug 23, 2020, 8:18:35 PM8/23/20
to weewx-user
Hi,

Appreciate you said 'This happens with all of the following settings in the [[wx_binding]] section' but could you humour us and and set manager = weewx.manager.DaySummaryManager under [DataBindings] [[wx_binding]] in weewx.conf. Restart WeeWX and if an error appears in the log post the log from when WeeWX was started through until the error appears making sure you capture the entire WeeWX startup. If the error is the same as above could you also post a wee_debug report, before posting the wee_debug report do check the output for usernames, passwords, API keys etc, wee_debug is pretty good at obfuscating these but its not perfect.

Gary

themet...@gmail.com

unread,
Aug 24, 2020, 3:02:44 AM8/24/20
to weewx-user
Well, well, well, Gary. Indulge you I did, and the first attempt failed with the same error when I issued this command:
service weewx start

Aug 23 22:13:41 picluster python3[9217]: weewx[9217] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] INFO __main__: Debug is 1
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG __main__: Initializing engine
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] INFO weewx.engine: Loading station type Vantage (weewx.drivers.vantage)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.drivers.vantage: Driver version is 3.2.1
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.drivers.vantage: Opened up serial port /dev/ttyUSB0; baud 19200; timeout 4.00
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.drivers.vantage: Gentle wake up of console successful
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.drivers.vantage: Hardware type is 16
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.drivers.vantage: ISS ID is 3
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.drivers.vantage: Hardware name: Vantage Pro2
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] INFO weewx.engine: StdConvert target unit is 0x11
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__: Caught unrecoverable exception:
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  Module 'weewx.wxmanager' has no attribute 'WxDaySummaryManager' when searching for 'weewx.wxmanager.WxDaySummaryManager'
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  Traceback (most recent call last):
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1098, in get_object
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      mod = getattr(mod, part)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  AttributeError: module 'weewx.wxmanager' has no attribute 'WxDaySummaryManager'
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  Traceback (most recent call last):
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 148, in main
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 75, in __init__
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      self.loadServices(config_dict)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/wxservices.py", line 81, in __init__
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      engine.db_binder)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/wxservices.py", line 124, in __init__
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      initialize=True)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/manager.py", line 530, in get_manager
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      self.manager_cache[data_binding] = open_manager(manager_dict, initialize)
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/manager.py", line 676, in open_manager
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      manager_cls = weeutil.weeutil.get_object(manager_dict['manager'])
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1102, in get_object
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****      "Module '%s' has no attribute '%s' when searching for '%s'" % (mod.__name__, part, module_class))
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  AttributeError: Module 'weewx.wxmanager' has no attribute 'WxDaySummaryManager' when searching for 'weewx.wxmanager.WxDaySummaryManager'
Aug 23 22:13:41 picluster python3[9217]: weewx[9217] CRITICAL __main__:     ****  Exiting.


Then I tried this without any change to the weewx.conf file at all:
service weewx restart

and blow me down it started!!!!!
I am really grateful for your reply. I was tearing what hair I have on top of my bald head trying to figure this one out!

Regards

Francis

Graham Eddy

unread,
Aug 24, 2020, 3:51:00 AM8/24/20
to weewx...@googlegroups.com
the two valid provided values for ‘manager =‘ are weewx.manager.DaySummaryManager (preferred) or weewx.wxmanager.WXDaySummaryManager (deprecated, and note it is not WxDay…) so you might want to check it is working properly….
Reply all
Reply to author
Forward
0 new messages