zhugan 发表于 2024-4-21 20:57:31

宝塔面板安装后提示错误

出错了,面板运行时发生错误!ImportError: cannot import name 'request' from 'requests.api' (/www/server/panel/pyenv/lib/python3.7/site-packages/requests/api.py)
REQUEST_DATE: 2024-04-21 18:56:50 PAN_VERSION: 8.0.1OS_VERSION: CentOS8.5.2111 x86_64(Py3.7.9) REMOTE_ADDR: 52.224.54.34 REQUEST_URI: POST /warning?action=get_listREQUEST_FORM: {}USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36Traceback (most recent call last):File "class/public.py", line 3506, in get_attr    tmp_obj = __import__(key)File "class/safe_warning/sw_docker_api.py", line 18, in   importpublic, os,requestsFile "/www/server/panel/pyenv/lib/python3.7/site-packages/requests/__init__.py", line 121, in   from .api import request, get, head, post, patch, put, delete, optionsImportError: cannot import name 'request' from 'requests.api' (/www/server/panel/pyenv/lib/python3.7/site-packages/requests/api.py)During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/www/server/panel/BTPanel/__init__.py", line 2018, in publicObject    res = run_obj.run(toObject, defs, get)File "/www/server/panel/BTPanel/__init__.py", line 1965, in run    result = getattr(toObject, get.action)(get)File "class/panelWarning.py", line 36, in get_list    if p._level == 0: continueFile "class/public.py", line 3515, in __getitem__    return self.get_attr(key)File "class/public.py", line 3511, in get_attr    raise Exception(get_error_info())Exception: Traceback (most recent call last):File "class/public.py", line 3506, in get_attr    tmp_obj = __import__(key)File "class/safe_warning/sw_docker_api.py", line 18, in   importpublic, os,requestsFile "/www/server/panel/pyenv/lib/python3.7/site-packages/requests/__init__.py", line 121, in   from .api import request, get, head, post, patch, put, delete, optionsImportError: cannot import name 'request' from 'requests.api' (/www/server/panel/pyenv/lib/python3.7/site-packages/requests/api.py)
[*]很抱歉,面板运行时意外发生错误,请尝试按以下顺序尝试解除此错误:
[*]修复方案一:在[首页]右上角点击修复面板,并退出面板重新登录。
[*]修复方案二:如上述尝试未能解除此错误,请截图此窗口到宝塔论坛发贴寻求帮助, 论坛地址:https://www.bt.cn/bbs

页: [1]
查看完整版本: 宝塔面板安装后提示错误