mqboard icon indicating copy to clipboard operation
mqboard copied to clipboard

Error in Hello World example

Open jose1711 opened this issue 2 years ago • 0 comments

In https://github.com/tve/mqboard/blob/master/mqtt_async/README.md:

def callback(topic, msg, retained, qos): print(topic, msg, retained, qos)
..
config.subs_cb = callback

while in mqtt_async.py there is:

cb = self._subs_cb(topic, msg, bool(retained), qos, dup)

This results in incorrect number of arguments being called:

function takes 4 positional arguments but 5 were given: exception in handler

This can be easily fixed (in README.md):

def callback(topic, msg, retained, qos, dup): print(topic, msg, retained, qos, dup)

jose1711 avatar Sep 14 '22 19:09 jose1711