proxy_pool icon indicating copy to clipboard operation
proxy_pool copied to clipboard

centos下运行会有中文编码问题,删除整个项目里的中文后,问题依旧存在

Open TeavenX opened this issue 8 years ago • 5 comments

UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 106: ordinal not in range(128)

TeavenX avatar Nov 03 '18 16:11 TeavenX

UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 106: ordinal not in range(128)

配置文件不能有中文

jhao104 avatar Nov 05 '18 01:11 jhao104

我把中文全都删了 还是不行,整个项目里的中文

TeavenX avatar Nov 05 '18 17:11 TeavenX

我把中文全都删了 还是不行,整个项目里的中文

那麻烦贴下完整日志

jhao104 avatar Nov 06 '18 01:11 jhao104

Process RefreshRun: Traceback (most recent call last): File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "../Schedule/ProxyRefreshSchedule.py", line 103, in run fetch_all() File "../Schedule/ProxyRefreshSchedule.py", line 93, in fetch_all p = ProxyRefreshSchedule() File "../Schedule/ProxyRefreshSchedule.py", line 41, in init ProxyManager.init(self) File "../Manager/ProxyManager.py", line 33, in init self.db = DbClient() File "../DB/DbClient.py", line 58, in init self.config = GetConfig() File "../Util/GetConfig.py", line 30, in init self.config_file.read(self.config_path) File "/usr/lib/python3.5/configparser.py", line 696, in read self._read(fp, filename) File "/usr/lib/python3.5/configparser.py", line 1012, in _read for lineno, line in enumerate(fp, start=1): File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 106: ordinal not in range(128)

ubuntu也有这个问题。。

ponyfe avatar Nov 11 '18 11:11 ponyfe

@liangpengfei 你这个报错也是 Config.ini里面有中文字符串。 另外别在win上用记事本打开,它会加个编码头

jhao104 avatar Nov 12 '18 01:11 jhao104