赞
踩
AttributeError
AttributeError: type object ‘User’ has no attribute ‘query’
Traceback (most recent call last)
File “D:\py\asset-manager\venv\lib\site-packages\flask\app.py”, line 2095, in call
return self.wsgi_app(environ, start_response)
File “D:\py\asset-manager\venv\lib\site-packages\flask\app.py”, line 2080, in wsgi_app
response = self.handle_exception(e)
File “D:\py\asset-manager\venv\lib\site-packages\flask\app.py”, line 2077, in wsgi_app
response = self.full_dispatch_request()
File “D:\py\asset-manager\venv\lib\site-packages\flask\app.py”, line 1525, in full_dispatch_request
rv = self.handle_user_exception(e)
File “D:\py\asset-manager\venv\lib\site-packages\flask\app.py”, line 1523, in full_dispatch_request
rv = self.dispatch_request()Open an interactive python shell in this frame
File “D:\py\asset-manager\venv\lib\site-packages\flask\app.py”, line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File “D:\py\asset-manager\pc_manager\permissions\user.py”, line 17, in test
user = User.query.filter_by(username=‘admin’).first()
AttributeError: type object ‘User’ has no attribute ‘query’
如下图
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。