From 37c1d0b64ee18a923da25dea18764197079efc42 Mon Sep 17 00:00:00 2001 From: Evan Lohn Date: Thu, 24 Jul 2025 17:39:16 -0700 Subject: [PATCH] attempt to fix parsing of tricky template files --- backend/onyx/file_processing/extract_file_text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/onyx/file_processing/extract_file_text.py b/backend/onyx/file_processing/extract_file_text.py index effd56225bc..622559f895f 100644 --- a/backend/onyx/file_processing/extract_file_text.py +++ b/backend/onyx/file_processing/extract_file_text.py @@ -317,7 +317,7 @@ def docx_to_text_and_images( try: doc = docx.Document(file) - except BadZipFile as e: + except (BadZipFile, ValueError) as e: logger.warning( f"Failed to extract docx {file_name or 'docx file'}: {e}. Attempting to read as text file." )