云服务器

首页 > 宝塔面板 > 宝塔面板数据库phpmyadmin无法进入,出现错误:ImportError: No module named http.cookies

宝塔面板数据库phpmyadmin无法进入,出现错误:ImportError: No module named http.cookies

出错了,面板运行时发生错误!

ImportError: No module named http.cookies

REQUEST_DATE: 2022-06-08 13:44:27
 PAN_VERSION: 7.9.2
  OS_VERSION: CentOS  7.7.1908 (Py2.7.5)
 REMOTE_ADDR: 60.169.143.129
 REQUEST_URI: POST /phpmyadmin/index.php?lang=zh_cn
REQUEST_FORM: {'pma_username': u'enionchem', 'db': u'enionchem', 'target': u'index.php', 'pma_password': u'iCXMrM32sFxGn2YC', 'server': u'1'}
  USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/www/server/panel/BTPanel/__init__.py", line 2371, in pma_proxy
    from panelHttpProxy import HttpProxy
  File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in __import__
    result = _import(*args, **kwargs)
  File "class/panelHttpProxy.py", line 16, in 
    from http.cookies import SimpleCookie
  File "/usr/lib64/python2.7/site-packages/gevent/builtins.py", line 96, in __import__
    result = _import(*args, **kwargs)
ImportError: No module named http.cookies
  • 很抱歉,面板运行时意外发生错误,请尝试按以下顺序尝试解除此错误:
  • 修复方案一:在[首页]右上角点击修复面板,并退出面板重新登录。
  • 修复方案二:如上述尝试未能解除此错误,请截图此窗口到宝塔论坛发贴寻求帮助, 论坛地址:https://www.bt.cn/bbs

解决方法:

这是服务器内已安装的python版本太低导致的报错,在SSH中执行下面的命令升级python后再试
注意不要用面板里面的终端执行。

curl http://download.bt.cn/install/update_panel.sh|bash

图片描述

发表回复