From d8422ea55ed5c6342f4a7f02dba010506fd7baf2 Mon Sep 17 00:00:00 2001 From: Eric Wunderlin Date: Thu, 9 Jan 2025 13:22:53 -0600 Subject: [PATCH] For csv files mimetypes.guess_type is returning "application/vnd.ms-excel" on windows causing an invalid mime type in plaintextconverter. In reference to issue: https://github.com/microsoft/markitdown/issues/150 --- src/markitdown/_markitdown.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/markitdown/_markitdown.py b/src/markitdown/_markitdown.py index 33806e1..38fc693 100644 --- a/src/markitdown/_markitdown.py +++ b/src/markitdown/_markitdown.py @@ -33,6 +33,9 @@ from bs4 import BeautifulSoup from charset_normalizer import from_path +# Override mimetype for csv to fix issue on windows +mimetypes.add_type("text/csv", ".csv") + # Optional Transcription support IS_AUDIO_TRANSCRIPTION_CAPABLE = False try: