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

Faild to get user data after create #19

Open
mrafieefard opened this issue Aug 15, 2024 · 1 comment
Open

Faild to get user data after create #19

mrafieefard opened this issue Aug 15, 2024 · 1 comment

Comments

@mrafieefard
Copy link
Contributor

mrafieefard commented Aug 15, 2024

I ran

token = await get_token()
    user = User(
        username="Mewhrzad",
        proxies={
            "vless": {"id": "35e7e39c-7d5c-1f4b-8b71-508e4f37ff53","flow": ""},
        },
        inbounds={"vless": ["Germany"]},
        expire=0,
        data_limit=0,
        data_limit_reset_strategy="no_reset",
        status="active",
    )
    result = await panel.add_user(user=user,token=token) #return new User object
    print(result)

and I got TypeError: User.__init__() got an unexpected keyword argument 'auto_delete_in_days'

I think the problem is for user.py line 9 while creating user instance ( auto_delete_in_days does not exist )

solution : You can add auto_delete_in_days arg to User class and also please add kwargs in this and other classes to stop causing these issues when Marzban update

@mrafieefard
Copy link
Contributor Author

#20

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