登陆处 密码错误多次 提示验证码时,无法显示验证码,/code报错如下:
TypeError: send_file() got an unexpected keyword argument 'cache_timeout'
REQUEST_DATE: 2024-08-30 21:23:54
PAN_VERSION: 7.7.0
OS_VERSION: Debian GNU/Linux 12 x86_64(Py3.7.16)
REMOTE_ADDR: 23.249.26.162
REQUEST_URI: GET /code?1725024227439
REQUEST_FORM: {}
USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Traceback (most recent call last):
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/www/server/panel/BTPanel/__init__.py", line 1146, in code
return send_file(out, mimetype='image/png', cache_timeout=0)
TypeError: send_file() got an unexpected keyword argument 'cache_timeout'
解决:找到/www/server/panel/BTPanel/__init__.py
1146行,删除cache_timeout
重启即可