FeeiCN/GSIL

出现一个错误

lupus721 opened this issue · 4 comments

Traceback (most recent call last):
File "/root/GSIL/gsil/init.py", line 37, in search
return Engine(token=token).search(rule)
File "/root/GSIL/gsil/engine.py", line 206, in search
if not self.process_pages(pages_content, page, total):
File "/root/GSIL/gsil/engine.py", line 101, in process_pages
if self._exclude_repository():
File "/root/GSIL/gsil/engine.py", line 345, in _exclude_repository
full_path = '{repository}/{path}'.format(repository=self.full_name.lower(), path=self.path.lower())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 2-3: ordinal not in range(128)

执行的时候发现的。。貌似编码的问题。。。

@lupus721
对应的仓库有吗?能复现吗?

@lupus721
对应的仓库有吗?能复现吗?

搜索其他的关键字的时候都是ok的只有搜索某个特定的时候才出这个问题
可以复现
{ "cec": { "cec.com.cn": { "\"cec.com.cn\"": { "mode": "normal-match", "ext": "txt,conf,jsp,asp,aspx,php,java,python,go,js,properties" } } } }
这里好像不能贴图。。。。。

可以更新下代码,如果还有出现可以再提下

git pull 到最新了,还是一样的提示。。。
2018-10-15 13:03:29,799 [GSIL] [INFO] ["cec.com.cn"] [1/40] Excluded because of the path, skip! Traceback (most recent call last): File "/root/GSIL/gsil/__init__.py", line 37, in search return Engine(token=token).search(rule) File "/root/GSIL/gsil/engine.py", line 213, in search if not self.process_pages(pages_content, page, total): File "/root/GSIL/gsil/engine.py", line 101, in process_pages if self._exclude_repository(): File "/root/GSIL/gsil/engine.py", line 352, in _exclude_repository full_path = '{repository}/{path}'.format(repository=self.full_name.lower(), path=self.path.lower()) UnicodeEncodeError: 'ascii' codec can't encode characters in position 2-3: ordinal not in range(128)