paho.mqtt.python icon indicating copy to clipboard operation
paho.mqtt.python copied to clipboard

docs: CallbackAPIVersion is not exported from module paho.mqtt.client

Open GNITOAHC opened this issue 1 year ago • 0 comments

Running README sample will occer this error: "CallbackAPIVersion" is not exported from module "paho.mqtt.client" It can be fixed by importing CallbackAPIVersion from paho.mqtt.enums

+from paho.mqtt.enums import CallbackAPIVersion

-mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
+mqttc = mqtt.Client(CallbackAPIVersion.VERSION2)

GNITOAHC avatar Jun 15 '24 07:06 GNITOAHC