Closed Purek closed 2 years ago
进Run目录里执行python main.py 不要直接在项目根目录执行python Run/main.py
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 106: ordinal not in range(128) 您好,运行后出现了这个错误。。。
root@ip-proxy:~/proxy_pool-1.12/Run# python main.py Process ProxyApiRun: Process ValidRun: Process RefreshRun: Traceback (most recent call last): File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, self._kwargs) File "../Api/ProxyApi.py", line 75, in run config = GetConfig() File "../Util/GetConfig.py", line 30, in init self.config_file.read(self.config_path) File "/opt/conda/lib/python3.6/configparser.py", line 697, in read self._read(fp, filename) File "/opt/conda/lib/python3.6/configparser.py", line 1015, in _read for lineno, line in enumerate(fp, start=1): File "/opt/conda/lib/python3.6/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) Traceback (most recent call last): File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, *self._kwargs) File "../Schedule/ProxyRefreshSchedule.py", line 97, in run main() File "../Schedule/ProxyRefreshSchedule.py", line 77, in main p = ProxyRefreshSchedule() File "../Schedule/ProxyRefreshSchedule.py", line 40, in init ProxyManager.init(self) File "../Manager/ProxyManager.py", line 32, 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 "/opt/conda/lib/python3.6/configparser.py", line 697, in read self._read(fp, filename) File "/opt/conda/lib/python3.6/configparser.py", line 1015, in _read for lineno, line in enumerate(fp, start=1): File "/opt/conda/lib/python3.6/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) Traceback (most recent call last): File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(self._args, self._kwargs) File "../Schedule/ProxyValidSchedule.py", line 71, in run p = ProxyValidSchedule() File "../Schedule/ProxyValidSchedule.py", line 31, in init ProxyManager.init(self) File "../Manager/ProxyManager.py", line 32, 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 "/opt/conda/lib/python3.6/configparser.py", line 697, in read self._read(fp, filename) File "/opt/conda/lib/python3.6/configparser.py", line 1015, in _read for lineno, line in enumerate(fp, start=1): File "/opt/conda/lib/python3.6/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)
echo $LANG
看看是不是utf8
运行为空了。。好像是这个问题,谢谢您啦
百度了下。。。还不是知道怎么设置。。能麻烦您告诉下应该设置成什么样吗?
可以运行了,谢谢大神
您好,在使用中遇到了一个问题,,运行
def delete_proxy(proxy): requests.get("http://127.0.0.1:5010/delete/?proxy={}".format(proxy))
delete_proxy(proxy) 返回success 但是网页上看/get_all/,该条数据还是存在。。这是什么原因呀?
File "Run/main.py", line 20, in
from Api.ProxyApi import run as ProxyApiRun
ModuleNotFoundError: No module named 'Api'
已经pip install Api 还是报错,能麻烦您指导下吗?