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

ImportError: cannot import name 'JSONWebSignatureSerializer' from 'itsdangerous' #1

Closed
Zlopez opened this issue May 29, 2023 · 5 comments

Comments

@Zlopez
Copy link

Zlopez commented May 29, 2023

I tried to upgrade ipsilon vagrant environment to F38 and most of the things are working, but the test-auth fails with following error:

[Mon May 29 13:46:55.025751 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538] mod_wsgi (pid=10502): Failed to exec Python script file '/usr/libexec/test-auth/test-auth.wsgi'.
[Mon May 29 13:46:55.025948 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538] mod_wsgi (pid=10502): Exception occurred processing WSGI script '/usr/libexec/test-auth/test-auth.wsgi'.
[Mon May 29 13:46:55.026558 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538] Traceback (most recent call last):
[Mon May 29 13:46:55.027310 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]   File "/usr/libexec/test-auth/test-auth.wsgi", line 4, in <module>
[Mon May 29 13:46:55.027375 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]     from test_auth import application
[Mon May 29 13:46:55.027417 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]   File "/usr/local/lib/python3.11/site-packages/test_auth/__init__.py", line 5, in <module>
[Mon May 29 13:46:55.027431 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]     from .oidc import app as oidc_app
[Mon May 29 13:46:55.027451 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]   File "/usr/local/lib/python3.11/site-packages/test_auth/oidc/__init__.py", line 4, in <module>
[Mon May 29 13:46:55.027463 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]     from flask_oidc import OpenIDConnect
[Mon May 29 13:46:55.027483 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]   File "/usr/local/lib/python3.11/site-packages/flask_oidc/__init__.py", line 41, in <module>
[Mon May 29 13:46:55.027496 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538]     from itsdangerous import JSONWebSignatureSerializer, BadSignature, \\
[Mon May 29 13:46:55.027541 2023] [wsgi:error] [pid 10502:tid 10604] [remote 192.168.122.1:37538] ImportError: cannot import name 'JSONWebSignatureSerializer' from 'itsdangerous' (/usr/lib/python3.11/site-packages/itsdangerous/__init__.py)

It seems that itsdangerous library removed or moved JSONWebSignatureSerializer.

@abompard
Copy link
Owner

This is caused by puiterwijk/flask-oidc#147.

I've migrated to authlib in 0d523a3.

@abompard
Copy link
Owner

I've also released version 0.0.2 that integrates this fix.

@frozenpandaman
Copy link

@Zlopez Did you ever solve this? I don't know what to do besides downgrading Flask.

cc @abompard

@Zlopez
Copy link
Author

Zlopez commented Jul 31, 2023

@frozenpandaman I just updated to newer version of test-auth, but I recommend to migrate to authlib instead of Flask-OIDC

@frozenpandaman
Copy link

@Zlopez I actually wasn't using Flask-OIDC, this popped up due to some combination of other libraries in conjunction with Flask, not sure exactly what/why… but my workaround works fine (for now anyway). Thanks!

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

No branches or pull requests

3 participants