pycasbin / async-sqlalchemy-adapter

Async SQLAlchemy Adapter for PyCasbin
https://github.com/casbin/pycasbin
Apache License 2.0
7 stars 6 forks source link

issue with sample code #14

Open adriano26010 opened 3 months ago

adriano26010 commented 3 months ago

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 commented 3 months ago

@techoner @Nekotoxin

balazser commented 2 months ago

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