From c37e3a64d2c118e22c75a1f10552dc8b0c2b6c06 Mon Sep 17 00:00:00 2001 From: Adam Fourney Date: Thu, 27 Feb 2025 23:04:54 -0800 Subject: [PATCH] Restore error logging behavior. --- packages/markitdown/src/markitdown/_markitdown.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/markitdown/src/markitdown/_markitdown.py b/packages/markitdown/src/markitdown/_markitdown.py index fc9093c..297f554 100644 --- a/packages/markitdown/src/markitdown/_markitdown.py +++ b/packages/markitdown/src/markitdown/_markitdown.py @@ -347,11 +347,10 @@ class MarkItDown: _kwargs["_parent_converters"] = self._page_converters # If we hit an error log it and keep trying - # try: - if True: + try: res = converter.convert(local_path, **_kwargs) - # except Exception: - # error_trace = ("\n\n" + traceback.format_exc()).strip() + except Exception: + error_trace = ("\n\n" + traceback.format_exc()).strip() if res is not None: # Normalize the content