Upgrade to 5.0.2 errors from 5.0.1

119 views
Skip to first unread message

Greg

unread,
Feb 10, 2024, 5:10:46 PMFeb 10
to weewx-development
I just upgraded to 5.0.2 and git this:
Feb 11 09:00:01 moonbi weewx: RXCHECK is 100.0
Feb 11 09:00:50 moonbi weewxd[1867968]: INFO weewx.engine: Starting main packet loop.
Feb 11 09:00:50 moonbi weewxd[1867968]: INFO weewx.drivers.fousb: station status {'rain_overflow': 0, 'lost_connection': 0, 'unknown': 0} (0)
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: MQTT: Unexpected exception of type <class 'TypeError'>
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: *** Traceback (most recent call last):
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: ***   File "/opt/weewx/weewx-venv/lib/python3.11/site-packages/weewx/restx.py", line 384, in run_loop
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: ***     self.process_record(_record, dbmanager)
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: ***   File "/opt/weewx/weewx-data/bin/user/mqtt.py", line 412, in process_record
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: ***     mc = mqtt.Client(client_id=client_id)
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: ***          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 11 09:00:50 moonbi weewxd[1867968]: ERROR weewx.restx: *** TypeError: Client.__init__() missing 1 required positional argument: 'callback_api_version'
Feb 11 09:00:50 moonbi weewxd[1867968]: CRITICAL weewx.restx: MQTT: Thread terminating. Reason: Client.__init__() missing 1 required positional argument: 'callback_api_version'

I have reverted back to version 5.0.1 and got the same error.

I upgraded paho-mqtt 1.6.1  to  2.0.0  and I am sure that is what caused those messages.

I have downgraded to paho-mqtt 1.6.1   and upgrade weewx to 5.0.2 and it works.

Conclusion: paho-mqtt   2.0.0 causes issues. weewx 5.0.2 works OK with the paho-mqtt 1.61 version

Thanks


Thanks

Greg

unread,
Feb 10, 2024, 5:20:35 PMFeb 10
to weewx-development
It is probably the extension for mqtt.
I have 2 mqtt extensions.
mqtt.py
MQTTSubscribe.py

I am not familiar with python. I will have a deeper look later.

bell...@gmail.com

unread,
Feb 10, 2024, 5:32:19 PMFeb 10
to weewx-development
Thanks for the heads up!  Looks like 2.0 will break every client…
From, https://github.com/eclipse/paho.mqtt.python/releases/tag/v2.0.0
  • BREAKING Added callback_api_version. This break ALL users of paho-mqtt Client class.
    See migrations.rst for details on how to upgrade.
    tl; dr; add CallbackAPIVersion.VERSION1 to first argument of Client()

G Hammer

unread,
Feb 11, 2024, 11:30:07 AMFeb 11
to weewx-development
While waiting for needed updates, I downgraded paho-mqtt
pip install paho-mqtt==1.6.1


Kruse Ludington

unread,
Feb 11, 2024, 1:33:35 PMFeb 11
to weewx-development
There is another issue - I have a special configuration so I had some issues with 5.0.1 but reverted back with the idea of giving the upgrade another shot (special log file locations I need, etc.). However, not at a command prompt-, there is already a problem with the new version 5.0.2 - this is from a command line (note the red text - there was a 16 digit # there for the key but I changed it to '#..."). Yes, it might not be a security issue, and yes, I am paranoid - 

I have reached out to tom directly. From a command line I get (see the red error messages):

pi@kruse-pi:~$ sudo apt update

Hit:1 http://deb.debian.org/debian bookworm InRelease

Get:2 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]

Hit:3 https://download.docker.com/linux/debian bookworm InRelease

Get:4 http://weewx.com/apt/python3 buster InRelease [4252 B]

Err:4 http://weewx.com/apt/python3 buster InRelease

  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ################

Fetched 48.0 kB in 1s (33.2 kB/s)

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

26 packages can be upgraded. Run 'apt list --upgradable' to see them.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://weewx.com/apt/python3 buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ################

W: Failed to fetch http://weewx.com/apt/python3/dists/buster/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ################

W: Some index files failed to download. They have been ignored, or old ones used instead.




Vince Skahan

unread,
Feb 11, 2024, 1:43:26 PMFeb 11
to weewx-development
Upgrade your apt keys - follow https://www.weewx.com/docs/5.0/quickstarts/debian/

You can post the PUBKEY it is complaining about.  It is a 'public' key so there's no security issue there.  It might help us debug your problem.

If you run 'apt-key list' it should contain output including the following....

/etc/apt/trusted.gpg.d/weewx.gpg
--------------------------------
pub   rsa3072 2023-08-23 [SC]
      3EF8 C49F 6B92 3DDC F4B9  93D0 B7D3 70EC 17FC 079E
uid           [ unknown] Tom Keffer (Author of WeeWX) <tke...@gmail.com>
sub   rsa3072 2023-08-23 [E]

pub   rsa4096 2024-01-23 [SC]
      AFFE E2C2 C6D2 BF84 90B0  59FF E788 768B 9CB1 6E10
uid           [ unknown] Matthew Wall <mwall...@gmail.com>
sub   rsa4096 2024-01-23 [E]

Kruse Ludington

unread,
Feb 11, 2024, 2:02:20 PMFeb 11
to weewx-development
Thank you that solved my issue
Reply all
Reply to author
Forward
0 new messages