Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined CallbackAPIVersion #822

Open
Helios06 opened this issue Mar 1, 2024 · 4 comments
Open

Undefined CallbackAPIVersion #822

Helios06 opened this issue Mar 1, 2024 · 4 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue. Status: More info needed More information needed from issue author

Comments

@Helios06
Copy link

Helios06 commented Mar 1, 2024

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'"

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Mar 1, 2024
@Helios06
Copy link
Author

Helios06 commented Mar 1, 2024

I solved the problem by installing python 3.12

@MattBrittan
Copy link
Contributor

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

  • 3.8.5 - Runs fine
  • 3.7 need typing_extensions (e.g. pip install typing_extensions) or you will get a ImportError: cannot import name 'Literal' from 'typing' (/usr/local/lib/python3.7/typing.py).

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

@mpechner
Copy link

I have this issue on python 3.11 on a raspberry pi using verion 2.1.0 of paho client

@MattBrittan
Copy link
Contributor

I have this issue on python 3.11 on a raspberry pi using verion 2.1.0 of paho client

@mpechner please provide more information (unfortunately a "me too" does not help us trace the issue, which appears to be related to users environments - we know the library works for most users and have not been able to duplicate this issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue. Status: More info needed More information needed from issue author
Projects
None yet
Development

No branches or pull requests

3 participants