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

Import Error ”path” from dependencies lib ”importlib-resources”. #917

Open
kento-machida opened this issue Jul 10, 2023 · 4 comments
Assignees

Comments

@kento-machida
Copy link

kento-machida commented Jul 10, 2023

We are facing an error with a dependent library "importlib-sources" that pysaml2 uses.
It updated this version to "6.0.0" on 7 Jul 2023.
One of the changes was the removal of "path".
Pysaml2 is that External libraries are not fixed.

File "/usr/local/lib/python3.9/site-packages/saml2/sigver.py", line 16, in <module>
from importlib_resources import path as _resource_path
ImportError: cannot import name 'path' from 'importlib_resources' (/usr/local/lib/python3.9/site-packages/importlib_resources/__init__.py)

Code Version

Pysaml2 6.5.0
Python 3.9

Expected Behavior

We can be used without errors by importing external libraries

Current Behavior

Getting an error importing ”path” from an external library "importlib-sources".

Possible Solution

Fix "importlib-sources" in the past version.
Or replace this with another solution.

Steps to Reproduce

@aklesh-sakunia
Copy link

+1, facing the same issue, any solution discovered so far?

@hicder
Copy link

hicder commented Jul 10, 2023

+1 here

@farioas
Copy link

farioas commented Jul 10, 2023

Found a workaround, pin this dependency version in your requirements.txt:

importlib-resources==5.13.0

Or

pip install --force-reinstall "importlib-resources==5.13.0"

@kento-machida
Copy link
Author

If python version is above 3.9, you can solve it by upgrading pysaml2 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants