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

issue with sample code #14

Open
adriano26010 opened this issue Jun 23, 2024 · 2 comments
Open

issue with sample code #14

adriano26010 opened this issue Jun 23, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@adriano26010
Copy link

Hi,
I belive sample code shoud be based on AsyncEnforcer not Enforcer.

e = casbin.AsyncEnforcer('path/to/model.conf', adapter)

with Enforcer I receive following error:

File "...venv/lib/python3.11/site-packages/casbin/core_enforcer.py", line 92, in init_with_model_and_adapter
raise RuntimeError("Invalid parameters for enforcer.")
RuntimeError: Invalid parameters for enforcer.

@casbin-bot
Copy link

@techoner @Nekotoxin

@casbin-bot casbin-bot added the question Further information is requested label Jun 23, 2024
@balazser
Copy link

balazser commented Aug 2, 2024

I wish I had found this information earlier. I had to go through the entire async-sqlalchemy-adapter and pycasbin to figure it out. 🙉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants