当前位置:论坛首页 > BUG提交 > Linux面板

【已解决】点击日志菜单报错

发表在 BUG提交2023-2-23 09:45 [复制链接] 3 3186

面板升级到Beta 7.9.82版本 新出现一个日志菜单,点击报错 微信图片_20230223094216.png

出错了,面板运行时发生错误!jinja2.exceptions.TemplateNotFound: logs.html
REQUEST_DATE: 2023-02-23 09:45:22 PAN_VERSION: 7.9.82  OS_VERSION: CentOS  7.9.2009 x86_64(Py3.7.9) REMOTE_ADDR: 39.129.17.73 REQUEST_URI: GET /logs?REQUEST_FORM: {}  USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.46Traceback (most recent call last):  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 2077, in wsgi_app    response = self.full_dispatch_request()  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1525, in full_dispatch_request    rv = self.handle_user_exception(e)  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1523, in full_dispatch_request    rv = self.dispatch_request()  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1509, in dispatch_request    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)  File "/webdata/www/server/panel/BTPanel/__init__.py", line 542, in logs    return render_template( 'logs.html',data=data)  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/templating.py", line 149, in render_template    ctx.app.jinja_env.get_or_select_template(template_name_or_list),  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/environment.py", line 1081, in get_or_select_template    return self.get_template(template_name_or_list, parent, globals)  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/environment.py", line 1010, in get_template    return self._load_template(name, globals)  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/environment.py", line 969, in _load_template    template = self.loader.load(self, name, self.make_globals(globals))  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/loaders.py", line 126, in load    source, filename, uptodate = self.get_source(environment, name)  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/templating.py", line 59, in get_source    return self._get_source_fast(environment, template)  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/templating.py", line 95, in _get_source_fast    raise TemplateNotFound(template)jinja2.exceptions.TemplateNotFound: logs.html

使用道具 举报 只看该作者 回复
发表于 2023-2-23 09:55:56 | 显示全部楼层
出错了,面板运行时发生错误!
jinja2.exceptions.TemplateNotFound: logs.html
REQUEST_DATE: 2023-02-23 09:55:40
PAN_VERSION: 7.9.82
  OS_VERSION: CentOS  7.9.2009 x86_64(Py3.7.9)
REMOTE_ADDR: 119.85.119.130
REQUEST_URI: GET /logs?
REQUEST_FORM: {}
  USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.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 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 542, in logs
    return render_template( 'logs.html',data=data)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/templating.py", line 146, in render_template
    template = app.jinja_env.get_or_select_template(template_name_or_list)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/environment.py", line 1081, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/environment.py", line 1010, in get_template
    return self._load_template(name, globals)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/environment.py", line 969, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/jinja2/loaders.py", line 126, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/templating.py", line 62, in get_source
    return self._get_source_fast(environment, template)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/templating.py", line 98, in _get_source_fast
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: logs.html
使用道具 举报 回复 支持 反对
发表于 2023-2-23 10:00:45 | 显示全部楼层
你好,根据上面提供的信息分析得知
可能是面板依赖的python环境损坏,可以尝试删掉损坏的环境,然后重新下载修复看是否正常,命令如下:
不要在面板里面的终端执行此命令。
  1. #删除面板依赖的环境
  2. mv /www/server/panel/pyenv /www/server/panel/pyenv.bak
  3. #修复环境
  4. curl http://download.bt.cn/install/update_panel.sh|bash
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-2-24 17:48:14 | 显示全部楼层
堡塔运维向樛木 发表于 2023-2-23 10:00
你好,根据上面提供的信息分析得知
可能是面板依赖的python环境损坏,可以尝试删掉损坏的环境,然后重新下 ...

已经解决了,新出现的日志菜单已经消失了
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表