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

casbin.Enforcer('model.conf', adapter, True) Error,miss the last one argument #1

Open
wssnail opened this issue Mar 5, 2021 · 3 comments

Comments

@wssnail
Copy link

wssnail commented Mar 5, 2021

Traceback (most recent call last):
  File "/Users/wn/ide/PycharmProjects/fastapi_test/casbin_test.py", line 9, in <module>
    e = casbin.Enforcer('model.conf', adapter, True)
TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given
@hsluoyz
Copy link

hsluoyz commented Mar 5, 2021

@Zxilly

@Zxilly
Copy link

Zxilly commented Mar 5, 2021

working On this

@Zxilly
Copy link

Zxilly commented Mar 5, 2021

@wssnail As for now, casbin.Enforcer works like

def __init__(self,
             model: Any = None,
             adapter: Any = None) -> Any

The document is outdated. I will make a PR to fix this.

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

Successfully merging a pull request may close this issue.

3 participants