eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.19k stars 722 forks source link

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

Open GNITOAHC opened 3 months ago

GNITOAHC commented 3 months ago

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)