Tuchuanhuhuhu commited on
Commit
cf3ed81
1 Parent(s): ed82ab0

bugfix: 修复构建索引失败的问题 #815

Browse files
Files changed (1) hide show
  1. modules/index_func.py +1 -1
modules/index_func.py CHANGED
@@ -47,7 +47,7 @@ def get_documents(file_src):
47
  pdftext = parse_pdf(filepath, two_column).text
48
  except:
49
  pdftext = ""
50
- with open(filepath, "rb", encoding="utf-8") as pdfFileObj:
51
  pdfReader = PyPDF2.PdfReader(pdfFileObj)
52
  for page in tqdm(pdfReader.pages):
53
  pdftext += page.extract_text()
 
47
  pdftext = parse_pdf(filepath, two_column).text
48
  except:
49
  pdftext = ""
50
+ with open(filepath, "rb") as pdfFileObj:
51
  pdfReader = PyPDF2.PdfReader(pdfFileObj)
52
  for page in tqdm(pdfReader.pages):
53
  pdftext += page.extract_text()