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

UserManager __init__ error #221

Open
abprojects opened this issue Jul 9, 2018 · 4 comments
Open

UserManager __init__ error #221

abprojects opened this issue Jul 9, 2018 · 4 comments

Comments

@abprojects
Copy link

abprojects commented Jul 9, 2018

I recently migrated to V1.0 and have been running into this error. I use application factory set up and use with app.app_context() statement (don't know if this is relevant to the error or not). I was wondering if anyone has experienced this or if anyone could help figure out how to debug this one. Any help would be appreciated as I have been stuck on this one for a while.

@inspiretk
Copy link

Whats in your File "prodserver.py" - show code

@inspiretk
Copy link

Someone else will have to help you here. I just don't know. All I see is this error:
File "/home/brucewayne/peak/peak/init.py", line 95, in create_app
user_manager = UserManager(app, db, User)
TypeError: init() takes at most 3 arguments (4 given)

  • so there's 4 data being pushed in when there should only be 3.
    Was it working with vr 0.6? When you say migrated to vr 1.0, what was the old one? Have you tried not migrating, but just getting this working first by itself?

@inspiretk
Copy link

Maybe check this:

  • You have: user_manager = UserManager(app, db, User)
  • The UserManager needs 4 inputs: https://github.com/lingthio/Flask-User/blob/master/flask_user/user_manager.py
    ** See Example part: user_manager = UserManager(app, db, User, UserEmailClass=UserEmail)
  • Maybe? Test and see what happens with 4 inputs, the UserEmailClass=UserEmail. That's just my hunch. I havn't done what you're doing. I've just got the basic flask setup only, and that's working on my side.
    If you want, you can post your code somewhere and I'll see if I can get it working on my side.

@inspiretk
Copy link

Yes you are right. Now it says 5 given, whereas before was 4 given. You need to find where that extra input is coming from.

I think somewhere, its giving 4 inputs, instead of 3.
That shows 4 inputs, but it needs 3 inputs.

What's line 95? File "/home/brucewayne/peak/peak/init.py", line 95, in create_app

Also, have you tried just getting the basic working first? Then migrate across? What are you migrating from? Maybe since you're migrating, you need to run migration code then when it's migrated, you run the running code. Maybe there's a conflict between migration and running code.

Hopefully somebody that's a pro will come and see you and help you.

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

2 participants