本帖最后由 goodreput 于 2024-2-15 19:08 编辑
如題,因為在寶塔上解壓縮phpbb,然後又把所有原碼刪除(當時因為想換別的ver.),後來又從回收站進行復原就發生此情況。
[Python] 纯文本查看 复制代码 TypeError: the JSON object must be str, bytes or bytearray, not bool
REQUEST_DATE: 2024-02-15 17:57:07
PAN_VERSION: 8.0.4
OS_VERSION: CentOS 7.9.2009 x86_64(Py3.7.9)
REMOTE_ADDR: 18.181.102.135
REQUEST_URI: GET /database?
REQUEST_FORM: {}
USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.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 2529, 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[rule.endpoint])(**view_args)
File "/www/server/panel/BTPanel/__init__.py", line 464, in database
comReturn = comm.local()
File "class/common.py", line 87, in local
result = self.setSession()
File "class/common.py", line 102, in setSession
g.menus = public.get_menus()
File "class/public.py", line 3246, in get_menus
data = json.loads(ReadFile('config/menu.json'))
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
解決辦法:修復面板指令或者直接更新至8.0.5 就恢復正常,這是最快解決方法。
其他細節復原操作就看哪位大神能提供。
備註:小弟使用的是20核CPU,底下一堆帶數據庫的網站,使用率接近90%,還有放蜘蛛池,更新至8.0.5 有一點點壓力,CPU使用率來到95%,可能8.0.5的面板有增加很多新功能導致。
|