From 63d1eefee532c45afb3969bc5ef37448ccc79473 Mon Sep 17 00:00:00 2001 From: Weves Date: Thu, 28 Nov 2024 16:00:45 -0800 Subject: [PATCH] Add read_only=True for xlsx parsing --- backend/danswer/file_processing/extract_file_text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/danswer/file_processing/extract_file_text.py b/backend/danswer/file_processing/extract_file_text.py index 9effad5b4..b36c44976 100644 --- a/backend/danswer/file_processing/extract_file_text.py +++ b/backend/danswer/file_processing/extract_file_text.py @@ -295,7 +295,7 @@ def pptx_to_text(file: IO[Any]) -> str: def xlsx_to_text(file: IO[Any]) -> str: - workbook = openpyxl.load_workbook(file) + workbook = openpyxl.load_workbook(file, read_only=True) text_content = [] for sheet in workbook.worksheets: sheet_string = "\n".join(