ImportError: cannot import name 'KeycloakOpenID'
Question:
How do I fix this error? Python 3.7.3, linux, keycloak==3.0.0
ImportError: cannot import name 'KeycloakOpenID' from 'keycloak' (/usr/local/lib/python3.7/dist-packages/keycloak/__init__.py)
cmd:
from keycloak import KeycloakOpenID
But the command import keycloak
succeeds. Also I’ve tried versions 1.0.0, 1.4, 2.0.0.
Answers:
Had this same error just now, found the solution. Make sure to install from:
pip install keycloak-client
Then import it doing:
from keycloak.keycloak_openid import KeycloakOpenID
# Configure client
keycloak_openid = KeycloakOpenID(
server_url="https://localhost:8443/auth/",
client_id="app_test",
realm_name="test_realm",
client_secret_key='SECRET_KEY'
)
I am trying to connect keycloak with odoo. I don’t know where we can fetch the client_Secret data from keycloak.
Let me know, how to establish the connection with keycloak to odoo.
we need to discuss this points, what are the configuration do we need to implement keycloak.
How do I fix this error? Python 3.7.3, linux, keycloak==3.0.0
ImportError: cannot import name 'KeycloakOpenID' from 'keycloak' (/usr/local/lib/python3.7/dist-packages/keycloak/__init__.py)
cmd:
from keycloak import KeycloakOpenID
But the command import keycloak
succeeds. Also I’ve tried versions 1.0.0, 1.4, 2.0.0.
Had this same error just now, found the solution. Make sure to install from:
pip install keycloak-client
Then import it doing:
from keycloak.keycloak_openid import KeycloakOpenID
# Configure client
keycloak_openid = KeycloakOpenID(
server_url="https://localhost:8443/auth/",
client_id="app_test",
realm_name="test_realm",
client_secret_key='SECRET_KEY'
)
I am trying to connect keycloak with odoo. I don’t know where we can fetch the client_Secret data from keycloak.
Let me know, how to establish the connection with keycloak to odoo.
we need to discuss this points, what are the configuration do we need to implement keycloak.