WeeWX won't crash, but MQTT won't work: when using weewx-mqtt with 
paho-mqtt-2.0.0, it fails with:

Exception ignored in: <function Client.__del__ at 0x73bc6028>
Traceback (most recent call last):
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/paho/mqtt/client.py", 
line 874, in __del__
    self._reset_sockets()
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/paho/mqtt/client.py", 
line 1133, in _reset_sockets
    self._sock_close()
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/paho/mqtt/client.py", 
line 1119, in _sock_close
    if not self._sock:
           ^^^^^^^^^^
AttributeError: 'Client' object has no attribute '_sock'
Exception in thread MQTT:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/weewx/restx.py", line 
357, in run
    self.run_loop(_manager)
  File 
"/home/michi/weewx-venv/lib/python3.11/site-packages/weewx/restx.py", line 
384, in run_loop
    self.process_record(_record, dbmanager)
  File "/home/michi/weewx-data/bin/user/mqtt.py", line 522, in 
process_record
    self.get_mqtt_client()
  File "/home/michi/weewx-data/bin/user/mqtt.py", line 444, in 
get_mqtt_client
    mc = mqtt.Client(client_id=client_id)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Client.__init__() missing 1 required positional argument: 
'callback_api_version'

With pip, install paho-mqtt-1.6.1 as a workaround:

pip install paho-mqtt==1.6.1

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/741ccdcb-2c24-43a0-94c9-6b9ae203f129n%40googlegroups.com.

Reply via email to