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

init_casbin()出错 #17

Closed
quanpower opened this issue May 31, 2021 · 1 comment
Closed

init_casbin()出错 #17

quanpower opened this issue May 31, 2021 · 1 comment

Comments

@quanpower
Copy link

init_db时报错,

python3 init_db.py
----------开发环境启动------------
角色-超级管理员-创建成功
角色-普通用户-创建成功
用户-王小右-创建成功
用户-测试用户-创建成功
Traceback (most recent call last):
File "init_db.py", line 93, in
init_casbin()
File "init_db.py", line 78, in init_casbin
e = get_casbin()
File "/home/quanpower/fastapi_app/common/sys_casbin.py", line 27, in get_casbin
e = casbin.Enforcer(settings.CASBIN_MODEL_PATH, adapter, True)
TypeError: init() takes from 1 to 3 positional arguments but 4 were given

@quanpower
Copy link
Author

看了下,问题在这,e = casbin.Enforcer(settings.CASBIN_MODEL_PATH, adapter,True),可能用的库有更新。把True给去掉好了,小东西就不提PR完了,麻烦小右一并改了吧,谢谢!

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

1 participant