Python3.7.1: AttributeError: 'NoneType' object has no attribute 'password'
See original GitHub issueI am getting an error with Python v3.7.1, which I did not get with v3.5.2:
AttributeError: 'NoneType' object has no attribute 'password'
Here is the complete traceback:
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask_user/user_manager.py", line 416, in login_stub
return self.login_view()
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask_user/user_manager__views.py", line 367, in login_view
if self.call_or_get(current_user.is_authenticated) and self.USER_AUTO_LOGIN_AT_LOGIN:
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/werkzeug/local.py", line 347, in __getattr__
return getattr(self._get_current_object(), name)
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/werkzeug/local.py", line 306, in _get_current_object
return self.__local()
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask_login/utils.py", line 26, in <lambda>
current_user = LocalProxy(lambda: _get_user())
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask_login/utils.py", line 335, in _get_user
current_app.login_manager._load_user()
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask_login/login_manager.py", line 359, in _load_user
return self.reload_user()
File "/home/user/projectname/venv3.7/lib/python3.7/site-packages/flask_login/login_manager.py", line 321, in reload_user
user = self.user_callback(user_id)
File "/home/user/projectname/venv3.7/lib/python3.7/site-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/user/projectname/venv3.7/lib/python3.7/site-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:5
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 >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 ...
Trac detected an internal error: AttributeError: 'NoneType' object has no attribute ... No login through webui, no password reset, no new user registration....
Read more >'NoneType' object has no attribute 'get_reset_token' : r/flask
AttributeError : 'NoneType' object has no attribute 'get_reset_token'. Why I am getting this error in my flask app? trying to use flask-mail.
Read more >How do I fix : attributeerror: 'nonetype' object has no attribute ...
When ever you get a problems that involves a message such as " 'nonetype' object has no attribute ..." it means the same...
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 Free
Top 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
Did you get an answer…? I have the same issue and it would be helpful if you could share your answer.
I have the same issue. Was trying to set up sqlite database with functions to insert data. Fiddling around with it, even dropping the database entirely. Now I can’t even access index.html. Seems to be some sort of issue with the password. No variables at all.