zjunlp / DeepKE

[EMNLP 2022] An Open Toolkit for Knowledge Graph Extraction and Construction
http://deepke.zjukg.cn/
MIT License
3.6k stars 694 forks source link

联合三元组抽取编码问题 #473

Closed chengmeng0 closed 7 months ago

chengmeng0 commented 7 months ago

Traceback (most recent call last): File "E:\Python\DeepKE-main\example\triple\cnschema\predict.py", line 42, in main data = f.readlines() UnicodeDecodeError: 'gbk' codec can't decode byte 0xa7 in position 15: illegal multibyte sequence

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace. 运行triple中的predict.py 出现以上报错,请问在哪文件修改编码呢?

zxlzr commented 7 months ago

您好,您可以网上搜索上如何修改文件的编码,报错的意思是文件编码和python代码的f.readlines()不一致。

chengmeng0 commented 7 months ago

好的,已经解决