jziolkowski / tdm

GUI application to discover and monitor devices flashed with https://github.com/arendst/tasmota
GNU General Public License v3.0
664 stars 84 forks source link

Incompatibility with paho 2 #267

Closed narc-Ontakac2 closed 1 month ago

narc-Ontakac2 commented 1 month ago

After an upgrade to Debian trixie tdm fails to start:

$ /usr/bin/tdmgr.py
Exception ignored in: <function Client.__del__ at 0x7f46798ea980>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 874, in __del__
    self._reset_sockets()
  File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
    self._sock_close()
  File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 1119, in _sock_close
    if not self._sock:
           ^^^^^^^^^^
AttributeError: 'Client' object has no attribute '_sock'

The likely cause is that paho has moved to version 2:

$ dpkg -l python3-paho-mqtt 
...
ii  python3-paho-mqtt 2.0.0-1      all          MQTT client class (Python 3)

This is a typical symptom which is described in this python paho issue.

jziolkowski commented 1 month ago

What a mess. Wow. They really didn't think that one through.

For now my recommendation would be to install TDM within its own venv, and not relying on system packages.

I need to think of a solution.

I'll also pin down the package requirements for paho.

Jason2866 commented 1 month ago

For now my recommendation would be to install TDM within its own venv, and not relying on system packages.

Back to square one. As you recommended to do (in the beginning)