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 'KeycloakOpenID' from 'keycloak' #575

Open
fedorenko-dmitriy opened this issue Jul 2, 2024 · 2 comments

Comments

@fedorenko-dmitriy
Copy link

Hi guys I got the error 'ImportError: cannot import name 'KeycloakOpenID' from 'keycloak''
Some times this error fixed by reinstalling the module pip uninstall python-keycloak / pip install python-keycloak. And some times need remove all venv. The behaviour very strange.

But when I try use pyinstaller through circleci this problem rise again

File "src\auth\auth_service.py", line 2, in <module> ImportError: cannot import name 'KeycloakOpenID' from 'keycloak'

auth_service.py
from keycloak import KeycloakOpenID

circleci config

  • run:
    name: Install Python Dependencies
    command: |
    choco install python --version=3.10
    pip install -r requirements.txt
    pip uninstall python-keycloak
    pip install setuptools
    pip install -U pyinstaller
    pip install python-keycloak

Any ideas?

@ryshoooo
Copy link
Collaborator

ryshoooo commented Jul 2, 2024

can you share your requirements.txt? I expect you have another package included like keycloak or keycloak-client. These packages collide with python-keycloak, see f.e. #559

@fedorenko-dmitriy
Copy link
Author

@ryshoooo yeh! you are totally right it was 'keycloak'!!! Thx very much. I spent a lot of time trying find this problem. Thx a lot!

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

2 participants