UTF8 Ignore read file errors

这个提交包含在:
fuqingxu
2023-04-12 16:57:01 +08:00
父节点 88a86635c6
当前提交 40bd857c70
共有 8 个文件被更改,包括 55 次插入8 次删除

查看文件

@@ -68,7 +68,7 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo
print('begin analysis on:', file_manifest)
for index, fp in enumerate(file_manifest):
if ".tex" in fp:
with open(fp, 'r', encoding='utf-8') as f:
with open(fp, 'r', encoding='utf-8', errors='replace') as f:
file_content = f.read()
if ".pdf" in fp.lower():
file_content = readPdf(fp)