【待反馈】出错了,面板运行时发生错误!
出错了,面板运行时发生错误!TypeError: the JSON object must be str, bytes or bytearray, not bool
出错了,面板运行时发生错误!
TypeError: the JSON object must be str, bytes or bytearray, not bool
REQUEST_DATE: 2023-04-21 10:54:04
PAN_VERSION: 7.9.9
OS_VERSION: CentOS7.9.2009 x86_64(Py3.7.9)
REMOTE_ADDR: 192.168.103.194
REQUEST_URI: GET /config?
REQUEST_FORM: {}
USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.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 2528, 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)(**view_args)
File "/www/server/panel/BTPanel/__init__.py", line 841, in config
if c_obj.get_token(None)['open']: data['api'] = 'checked'
File "class/config.py", line 1459, in get_token
return panelApi.panelApi().get_token(get)
File "/www/server/panel/class/panelApi.py", line 16, in get_token
data = self.get_api_config()
File "/www/server/panel/class/panelApi.py", line 66, in get_api_config
data = json.loads(tmp)
File "/www/server/panel/pyenv/lib/python3.7/json/__init__.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not bool 您好,此问题是无法加载到/www/server/panel/config/api.json下的文件内容,所以导致此问题错误返回了。
您可以在面板设置---API设置关闭重新打开,然后再看下是否正常。如还是不正常的话。
在文件管理,找到/www/server/panel/config/api.json文件,将内容修改为:{}
保存后重启下面板,再去打开看看是否正常
页:
[1]