flask应用程序正确启动,但登录后显示错误
我正在使用这个python应用程序的停靠版本 主页加载正确。但是在输入默认密码“admin”后,我得到了一个错误flask应用程序正确启动,但登录后显示错误,flask,Flask,我正在使用这个python应用程序的停靠版本 主页加载正确。但是在输入默认密码“admin”后,我得到了一个错误 [2021-04-30 15:07:23,451] ERROR in app: Exception on /cast [GET] Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_a
[2021-04-30 15:07:23,451] ERROR in app: Exception on /cast [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
TypeError: wrapper() missing 1 required positional argument: 'fn'
不确定此错误是否与docker或flask有关
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
我认为文件中装饰者后面的括号不见了。
它应该如下所示,因为decorator允许可选参数,否则函数将无法正确包装
@http.route("/cast")
@jwt_required()
def index():
# ...
您是否可以添加Dockerfile内容以了解更多问题?