宝塔安装包更新报错add_etags随笔
更新版本:宝塔linux版 7.9.3 、 7.9.4
时间:2022年8月-2022年9月
更新后出现的问题:
出错了,面板运行时发生错误!
TypeError: send_file() got an unexpected keyword argument 'add_etags'
REQUEST_DATE: 2022-09-29 21:20:55
PAN_VERSION: 7.7.0
OS_VERSION: CentOS 7.6.1810 x86_64(Py3.7.9)
REMOTE_ADDR: 120.229.139.190
REQUEST_URI: GET /download?filename=%2Fwww%2Fwwwroot%*********GhFa.tar.gz
REQUEST_FORM: {}
USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1.0
Traceback (most recent call last):
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/www/server/panel/BTPanel/__init__.py", line 943, in download
cache_timeout=0)
TypeError: send_file() got an unexpected keyword argument 'add_etags'
解决的办法:暂时未解决,也许是上月升级了Flask框架导致。
可提供的解决方案:
1、修复宝塔面板
可行性较强,登录服务器bt,选16即可。
2、覆盖插件对应的目录
危险性较高,一旦pyenv目录覆盖失败,宝塔面板无法登录,并且无法修复。最后的唯一办法,卸载宝塔或重装系统。 ps:pyenv是需要pip安装的。小编就傻傻覆盖,直接挂掉服务器。
卸载的命令:
wget http://download.bt.cn/install/bt-uninstall.sh
sh bt-uninstall.sh
以下私人笔记为宝塔的历史记录(2022.9.20),仅作者可见