为了能快速了解并处理您的问题,请提供以下基础信息:
问题描述:面板报错,提示编码报错Traceback (most recent call last):
File "E:\BtSoft\panel/class\public.py", line 363, in ReadFile
f_body = fp.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xef in position 0: illegal multibyte sequence
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\BtSoft\panel/class\public.py", line 373, in ReadFile
f_body = fp.read()
File "C:\Program Files\python\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 0: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\BtSoft\panel/class\public.py", line 382, in ReadFile
f_body = fp.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xef in position 0: illegal multibyte sequence
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\BtSoft\panel\BTPanel\__init__.py", line 1584, in publicObject
return run_exec().run(toObject, defs, get)
File "E:\BtSoft\panel\BTPanel\__init__.py", line 1825, in run
result = resobj(get)
File "E:\BtSoft\panel/class\data.py", line 142, in getData
site['ssl'] = self.get_site_ssl_info(webType, site['name'])
File "E:\BtSoft\panel/class\data.py", line 163, in get_site_ssl_info
conf = public.readFile(file)
File "E:\BtSoft\panel/class\public.py", line 406, in readFile
return ReadFile(filename, mode)
File "E:\BtSoft\panel/class\public.py", line 391, in ReadFile
f_body = fp.read()
File "C:\Program Files\python\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'mbcs' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page.
|
|