eschava / psmqtt

Utility reporting system health and status via MQTT
MIT License
159 stars 35 forks source link

paho missing 1 required positional argument: 'callback_api_version' #36

Closed sshort1955 closed 6 months ago

sshort1955 commented 8 months ago

Came across this after fresh install of psmqtt. Requirements.txt installs paho-mqtt V2.0, which has a breaking change with psmqtt. Fix for now that I found was to revert paho-mqtt to V1.6 by running this command:

sudo pip3 install "paho-mqtt < 2.0.0"

sudo is required because the psmqtt service runs under root.

mbuette commented 7 months ago

Came across the same issue yesterday. You'll need to modify the following line in src/task.py: self.mqttc = paho.Client(paho.CallbackAPIVersion.VERSION1, client_id, clean_session=clean_session, userdata=self, protocol=paho.MQTTv311) I'll try to create a PR for that, but I'm a noob at GitHub. Otherwise, thanks for your work!

eschava commented 6 months ago

seems to be fixed already