'Error while trying to integrate keycloak with django

I'm trying to integrate keycloak with my django app using Djanog Keycloak and following the tutorial, but I'm getting the following error:

  File "/home/enzo/.local/lib/python3.10/site- 
packages/django_keycloak/admin/__init__.py", line 3, in <module>
from django_keycloak.admin.realm import RealmAdmin
File "/home/enzo/.local/lib/python3.10/site-packages/django_keycloak/admin/realm.py", 
line 2, in <module>
from keycloak.exceptions import KeycloakClientError
ImportError: cannot import name 'KeycloakClientError' from 'keycloak.exceptions' 
(/home/enzo/.local/lib/python3.10/site-packages/keycloak/exceptions.py)

Does someone know how to solve?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source