Error in startup of homie-ota.py: on_connection() takes 3 arguments, 4 given
Closed this issue · 1 comments
raderjuber commented
Trying to run Homie-OTA, I get the following error trying to run homie-ota.py. I have edited the homie-ota.ini file to remove the username/password to connect to MQTT since I'm not using any authN, but otherwise made no changes. Appears to be a bug somewhere in calling the Paho MQTT client?
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 2606, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1470, in loop_forever
rc = self.loop(timeout, max_packets)
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 995, in loop
rc = self.loop_read(max_packets)
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1273, in loop_read
rc = self._packet_read()
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1838, in _packet_read
rc = self._packet_handle()
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 2291, in _packet_handle
return self._handle_connack()
File "/home/pi/.venvs/homie-ota/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 2349, in _handle_connack
self.on_connect(self, self._userdata, flags_dict, result)
TypeError: on_connect() takes exactly 3 arguments (4 given)
jpmens commented
PAHO changed the number of arguments in the on_connect call; I'll fix this in a jiffy and push.