You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AttributeError raised when importing: from authlib.integrations.flask_oauth2 import ResourceProtector
Error Stacks
File "/home//anaconda3/envs/taskapp/lib/python3.11/site-packages/flask_oidc/__init__.py", line 16, in <module>
from authlib.integrations.flask_oauth2 import ResourceProtector
File "/home//anaconda3/envs/taskapp/lib/python3.11/site-packages/authlib/integrations/flask_oauth2/__init__.py", line 4, in <module>
from .resource_protector import (
File "/home//anaconda3/envs/taskapp/lib/python3.11/site-packages/authlib/integrations/flask_oauth2/resource_protector.py", line 15, in <module>
from .errors import raise_http_exception
File "/home//anaconda3/envs/taskapp/lib/python3.11/site-packages/authlib/integrations/flask_oauth2/errors.py", line 6, in <module>
_version = importlib.metadata.version('werkzeug').split('.')[0]
^^^^^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'metadata'
To Reproduce
A minimal example to reproduce the behavior: from authlib.integrations.flask_oauth2 import ResourceProtector
Expected behavior
Clean import
Environment:
OS: Ubuntu
Python Version: 3.11
Authlib Version: 1.3.0
Additional context
I think the simple fix is to add 'import importlib.metadata' at the top. Thanks!
The text was updated successfully, but these errors were encountered:
same issue here i can fix it manually by going into source and changing the import of authlib\integrations\flask_oauth2\errors.py to importlib.metadata
Describe the bug
AttributeError raised when importing: from authlib.integrations.flask_oauth2 import ResourceProtector
Error Stacks
To Reproduce
A minimal example to reproduce the behavior: from authlib.integrations.flask_oauth2 import ResourceProtector
Expected behavior
Clean import
Environment:
Additional context
I think the simple fix is to add 'import importlib.metadata' at the top. Thanks!
The text was updated successfully, but these errors were encountered: