{"record":{"id":"99765f2be98c87d1","repo":"microsoft/markitdown","slug":"converter-recognized-the-input-as-a-potential-e-99765f","errorCode":null,"errorMessage":"{converter} recognized the input as a potential {extension} file, but the dependencies needed to read {extension} files have not been installed. To resolve this error, include the optional dependency [{feature}] or [all] when installing MarkItDown. For example:\n\n* pip install 'markitdown[{feature}]'\n* pip install 'markitdown[all]'\n* pip install 'markitdown[{feature}, ...]'\n* etc.","messagePattern":"(.+?) recognized the input as a potential (.+?) file, but the dependencies needed to read (.+?) files have not been installed\\. To resolve this error, include the optional dependency \\[(.+?)\\] or \\[all\\] when installing MarkItDown\\. For example:\n\n\\* pip install 'markitdown\\[(.+?)\\]'\n\\* pip install 'markitdown\\[all\\]'\n\\* pip install 'markitdown\\[(.+?), \\.\\.\\.\\]'\n\\* etc\\.","errorType":"exception","errorClass":"MissingDependencyException","httpStatus":null,"severity":"error","filePath":"packages/markitdown/src/markitdown/converters/_outlook_msg_converter.py","lineNumber":81,"sourceCode":"                    \"__properties_version1.0\" in toc\n                    and \"__recip_version1.0_#00000000\" in toc\n                )\n        except Exception as e:\n            pass\n        finally:\n            file_stream.seek(cur_pos)\n\n        return False\n\n    def convert(\n        self,\n        file_stream: BinaryIO,\n        stream_info: StreamInfo,\n        **kwargs: Any,  # Options to pass to the converter\n    ) -> DocumentConverterResult:\n        # Check: the dependencies\n        if _dependency_exc_info is not None:\n            raise MissingDependencyException(\n                MISSING_DEPENDENCY_MESSAGE.format(\n                    converter=type(self).__name__,\n                    extension=\".msg\",\n                    feature=\"outlook\",\n                )\n            ) from _dependency_exc_info[\n                1\n            ].with_traceback(  # type: ignore[union-attr]\n                _dependency_exc_info[2]\n            )\n\n        assert (\n            olefile is not None\n        )  # If we made it this far, olefile should be available\n        msg = olefile.OleFileIO(file_stream)\n\n        # Extract email metadata\n        md_content = \"# Email Message\\n\\n\"","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/microsoft/markitdown/blob/fd239d5d2be43d9b68329730206b9312c7d5a388/packages/markitdown/src/markitdown/converters/_outlook_msg_converter.py#L63-L99","documentation":"MarkItDown's OutlookMsgConverter raises MissingDependencyException when convert() runs but the import of its .msg parsing library (extract-msg) failed at module load. The stream was accepted as a potential .msg file (extension or outlook mimetype sniffing), yet the runtime lacks the 'outlook' optional extra. The module-level try/except captures the ImportError so the error surfaces only at conversion time, not import time.","triggerScenarios":"Calling convert() on a stream with extension .msg (or content matching the msg sniff in accepts()) when markitdown was installed without the [outlook] extra; or when extract-msg is present but fails to import due to broken dependencies (it needs olefile and others).","commonSituations":"Base `pip install markitdown` in a service that later receives .msg attachments; automated email-ingestion pipelines assuming all formats work out of the box; pip dependency resolution silently removing extract-msg during an upgrade.","solutions":["Install the outlook extra: pip install 'markitdown[outlook]'","Or install everything: pip install 'markitdown[all]'","Verify the underlying import works: python -c \"import extract_msg\"; reinstall if it fails","Declare markitdown[outlook] in your application's requirements so the extra is never omitted in deployments"],"exampleFix":"# before\npip install markitdown\nmarkitdown email.msg  # MissingDependencyException\n\n# after\npip install 'markitdown[outlook]'\nmarkitdown email.msg","handlingStrategy":"try-catch","validationCode":"from markitdown.converters._outlook_msg_converter import _dependency_exc_info\n\ndef can_convert_msg() -> bool:\n    return _dependency_exc_info is None","typeGuard":null,"tryCatchPattern":"from markitdown import MarkItDown, MissingDependencyException\n\ntry:\n    result = MarkItDown().convert(\"email.msg\")\nexcept MissingDependencyException:\n    logger.error(\"install markitdown[outlook] to process .msg files\")\n    raise","preventionTips":["Install markitdown[outlook] in any pipeline that ingests email attachments","Probe _dependency_exc_info at startup for each supported format","Restrict accepted upload types to formats whose extras you actually install"],"tags":["dependencies","installation","outlook","msg","optional-extras"],"backgroundTag":null,"analyzedSha":"fd239d5d2be43d9b68329730206b9312c7d5a388","analyzedAt":"2026-08-14T15:47:51.745Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}