Improve ocr loader error message
This commit is contained in:
parent
1a4fd7c33f
commit
7fc54d52e4
|
@ -32,9 +32,10 @@ def read_pdf_unstructured(input_path: Union[Path, str]):
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from unstructured.partition.auto import partition
|
from unstructured.partition.auto import partition
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"Please install unstructured PDF reader `pip install unstructured[pdf]`"
|
"Please install unstructured PDF reader `pip install unstructured[pdf]`: "
|
||||||
|
f"{e}"
|
||||||
)
|
)
|
||||||
|
|
||||||
page_items = defaultdict(list)
|
page_items = defaultdict(list)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user