Skip to content

Conversation

@afourney
Copy link
Member

Presently, when conversions fail, the converter moves on to the next in the list, and only the final error bubbles up (if no converter worked).

With this fix, all failed conversion attempts are logged and can be accessed in the FileConversionException.attempts attribute. The error message is also more clear. E.g.,

markitdown._exceptions.FileConversionException: File conversion failed after 3 attempts:
 - PptxConverter threw ValueError with message: Testing error handling
 - XlsxConverter threw OSError with message: File contains no valid workbook part
 - DocxConverter threw ValueError with message: Could not find the body element: are you sure this is a docx file?

@afourney afourney requested a review from gagb February 28, 2025 20:49
@afourney afourney merged commit 43bd79a into main Mar 1, 2025
3 checks passed
@afourney afourney deleted the better_exceptions branch March 1, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants