mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Flip catching modulenotfound to import error exception
This commit is contained in:
parent
8c3d5a49da
commit
dbaa892665
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class PdfToEntries(TextToEntries):
|
|||
f.write(bytes)
|
||||
try:
|
||||
loader = PyMuPDFLoader(f"{tmp_file}", extract_images=True)
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
loader = PyMuPDFLoader(f"{tmp_file}")
|
||||
pdf_entries_per_file = [page.page_content for page in loader.load()]
|
||||
entry_to_location_map += zip(pdf_entries_per_file, [pdf_file] * len(pdf_entries_per_file))
|
||||
|
|
Loading…
Reference in a new issue