Skip to content

Commit e011d9b

Browse files
fix: add logging to empty except block for partition_pdf import failure
Co-Authored-By: unknown <>
1 parent b3389f7 commit e011d9b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

airbyte_cdk/sources/file_based/file_types/unstructured_parser.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ def _import_unstructured() -> None:
8989

9090
unstructured_partition_pdf = partition_pdf
9191
except (ImportError, ModuleNotFoundError):
92-
pass
92+
# partition_pdf requires the heavy unstructured_inference package;
93+
# PDF support is disabled when it is not installed.
94+
logger = logging.getLogger(__name__)
95+
logger.info(
96+
"Could not import unstructured.partition.pdf (requires unstructured_inference). PDF parsing will be unavailable."
97+
)
9398

9499

95100
def user_error(e: Exception) -> bool:

0 commit comments

Comments
 (0)