From 73ba69d8cd44d3a95bbeb8d99188087777963402 Mon Sep 17 00:00:00 2001 From: wunde005 Date: Sat, 8 Feb 2025 22:58:13 -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 (#273) --- src/markitdown/_markitdown.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/markitdown/_markitdown.py b/src/markitdown/_markitdown.py index 9f610f6..e68b099 100644 --- a/src/markitdown/_markitdown.py +++ b/src/markitdown/_markitdown.py @@ -46,6 +46,9 @@ from azure.identity import DefaultAzureCredential # This constant is a temporary fix until the bug is resolved. CONTENT_FORMAT = "markdown" +# Override mimetype for csv to fix issue on windows +mimetypes.add_type("text/csv", ".csv") + # Optional Transcription support IS_AUDIO_TRANSCRIPTION_CAPABLE = False try: