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

Python 3.12 or newer requires oneagent-sdk>=1.5.1 #32

Closed
Oberon00 opened this issue Jan 2, 2024 · 0 comments · Fixed by #34
Closed

Python 3.12 or newer requires oneagent-sdk>=1.5.1 #32

Oberon00 opened this issue Jan 2, 2024 · 0 comments · Fixed by #34
Assignees

Comments

@Oberon00
Copy link
Member

Oberon00 commented Jan 2, 2024

When trying to use OneAgent SDK on Python 3.12 or newer, you will encounter this error when using a SDK version older than 1.5.1:

>>> import oneagent
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../lib/python3.12/site-packages/oneagent/__init__.py", line 84, in <module>
    from oneagent._impl.six.moves import range #pylint:disable=import-error
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'oneagent._impl.six.moves'

You need to upgrade at least to oneagent-sdk>=1.51 for Python 3.12 support. While oneagent-sdk 1.4.x generally remains supported (until 2024-06-01), there are currently no plans to add Python 3.12 support to 1.4.x.


Note that if you enable logging for the Python SDK (for example as explained in the Troubleshooting section of the README), you may encounter a warning message similar to the following:

2024-01-04 10:48:01.767 UTC [7fc3553a4040] WARNING [py_sdk] Could not get native SDK path via pkg_resources: loading native SDK library might fail
Traceback (most recent call last):
  File ".../lib/python3.12/site-packages/oneagent/_impl/native/sdkctypesiface.py", line 797, in loadsdk
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

This warning message is harmless and should be ignored. The cause is the removal of setuptools from default installations: python/cpython#95299. The SDK will fall back to calculating the path to load the native SDK shared library itself which typically works without any problems.

@Oberon00 Oberon00 self-assigned this Jan 2, 2024
@Oberon00 Oberon00 pinned this issue Jan 2, 2024
@Oberon00 Oberon00 mentioned this issue Jan 4, 2024
@Oberon00 Oberon00 changed the title Python 3.12 or newer is currently unsupported Python 3.12 or newer requires oneagent-sdk>=1.5.1 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant