eclipse / paho.mqtt.python

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

Undefined CallbackAPIVersion #822

Open Helios06 opened 4 months ago

Helios06 commented 4 months ago

Under PyCharm a simple project using python 3.8.5 and venv leads to this error even so the package installed is paho-mqtt v2.0.0

coding this

import paho.mqtt.client as mqtt ...... mqtt.CallbackAPIVersion.VERSION2 ..... leads to "cannot find reference 'CallbackAPIVersion'"

Helios06 commented 4 months ago

I solved the problem by installing python 3.12

MattBrittan commented 3 months ago

I checked (under Docker) using the basic example app and:

I suspect you may have had an older version of the library installed in your environment?