-
Notifications
You must be signed in to change notification settings - Fork 156
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
AttributeError: 'bool' object has no attribute '__call__' when visiting localhost:5000 #9
Comments
I encountered this issue as well, and spent far too long in determining that it's caused by Flask-Login. They changed current_user.is_authenticated() to be a property in 0.3.0, and thus making a method call here generates this error. This will need to be updated in Flask-User, I'm going to submit a pull request shortly. In the meantime, you can downgrade to Flask-Login==0.2.11 which won't have those changes in yet(but I have no idea if that will break anything else - I'm guessing not, but caveat emptor). |
Thank you! Really appreciate it. Yeah, it would be great to get this fixed. In the meantime I'll downgrade Flask-Login. Edit: I tried this and got the following error:
I might just go through and change it manually for the moment. Looks like it's only two files, views.py and decorators.py that need changes I believe. |
Truth be told, I didn't really look at the changelist for 0.3.0, I was hoping it was just that one issue. FYI I'm using my patched version, and was able to go through the whole user registration/login/logout flow, so I suspect that the fix won't be that far out. You can track its progress here: lingthio/Flask-User#91 |
I met this problem.I am using flask-login for the version of 0.3.2. As jamescarignan said,I use "current_user.is_authenticated" instead of "current_user.is_authenticated()" and it seems works, has no idea if there is another problem.has this be fixed? thx! |
as @AdamSun and @jamescarignan . I actually had to write 'current_user.is_authenticated" without the parenteses at the end |
Signed-off-by: Kevin <[email protected]>
I have the exact same problem as well. I am using; |
Exact same problem here. Like @guinslym , I now use |
I had the same issue and just removed the parentheses after authenticated. |
Same issue here, I get the same problem whether I use "current_user.is_authenticated" or "current_user.is_authenticated()". |
wonderful!! I got that issue as well,and I adopt the way you said, wipe off "()",Using "current_user.is_authenticated" instead of "current_user.is_authenticated()" |
I followed the installation instructions and all of the requirements install successfully. I'm using the newest version of virtualenvwrapper. When I visit localhost:5000 I get the following error:
I'm somewhat new to flask and to Python, apologies if this is not a problem with the application itself, but I am stumped as to how to fix it. I googled a couple of solutions and haven't found anything that works. Thank you!
The text was updated successfully, but these errors were encountered: