AttributeError: 'NoneType' object has no attribute 'password'
See original GitHub issueHappens if I delete the DB file. Works if I leave it alone for a few. Nothing with variables, this is all something with Flask-User Full Traceback:
Traceback (most recent call last):
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/ec2-user/environment/AmusedGrape/ask/server.py", line 128, in home_page
return render_template('index.html')
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/templating.py", line 133, in render_template
ctx.app.update_template_context(context)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask/app.py", line 792, in update_template_context
context.update(func())
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask_login/utils.py", line 368, in _user_context_processor
return dict(current_user=_get_user())
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask_login/utils.py", line 335, in _get_user
current_app.login_manager._load_user()
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask_login/login_manager.py", line 359, in _load_user
return self.reload_user()
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask_login/login_manager.py", line 321, in reload_user
user = self.user_callback(user_id)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask_user/user_manager.py", line 130, in load_user_by_user_token
user = self.db_manager.UserClass.get_user_by_token(user_token)
File "/home/ec2-user/environment/AmusedGrape/ask/flask/lib/python3.6/dist-packages/flask_user/user_mixin.py", line 52, in get_user_by_token
user_password = '' if user_manager.USER_ENABLE_AUTH0 else user.password[-8:]
AttributeError: 'NoneType' object has no attribute 'password'
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
AttributeError: 'NoneType' object has no attribute 'password'
According to the documentation for first method: Return the first result of this Query or None if the result doesn't contain any row....
Read more >Flasksecurity Attributeerror: 'Nonetype' Object Has No Attribute
AttributeError : 'NoneType' object has no attribute 'checkpassword' This a my aap.py file If I'm providing a email and password which is unregistered....
Read more >How do I fix : attributeerror: 'nonetype' object has no attribute ...
The message is telling you that info_box.find did not find anythings, so it returned None . And a None object does not have...
Read more >AttributeError: NoneType object has no attribute 'encode'
The Python "AttributeError: 'NoneType' object has no attribute 'encode'" occurs when we try to call the encode() method on a None value, e.g....
Read more >AttributeError: 'NoneType' object has no attribute 'encode ...
No login through webui, no password reset, no new user registration. Perhaps the full Traceback can help... Traceback (most recent call last): File...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Deleting cookies worked for me - but really should be fixed for “real”.
@saitam1 I am using 3.6.5. I’ll try to delete the session cookies. I cleared the browser cookies and that seemed to fix it.