{"record":{"id":"b749f6c865ff5006","repo":"microsoft/markitdown","slug":"converter-recognized-the-input-as-a-potential-e-b749f6","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/_pptx_converter.py","lineNumber":69,"sourceCode":"\n        if extension in ACCEPTED_FILE_EXTENSIONS:\n            return True\n\n        for prefix in ACCEPTED_MIME_TYPE_PREFIXES:\n            if mimetype.startswith(prefix):\n                return True\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=\".pptx\",\n                    feature=\"pptx\",\n                )\n            ) from _dependency_exc_info[\n                1\n            ].with_traceback(  # type: ignore[union-attr]\n                _dependency_exc_info[2]\n            )\n\n        # Perform the conversion\n        presentation = pptx.Presentation(file_stream)\n        md_content = \"\"\n        slide_num = 0\n        for slide in presentation.slides:\n            slide_num += 1\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/microsoft/markitdown/blob/fd239d5d2be43d9b68329730206b9312c7d5a388/packages/markitdown/src/markitdown/converters/_pptx_converter.py#L51-L87","documentation":"MarkItDown's PptxConverter raises MissingDependencyException when convert() runs but python-pptx (the [pptx] extra) failed to import at module load. accepts() matched .pptx extension or the pptx mimetype, then the dependency guard in convert() fires. The pattern is identical to the other office converters: import failure is cached in _dependency_exc_info at module import time and re-raised here with formatting instructions.","triggerScenarios":"Calling convert() on a stream with extension .pptx or mimetype application/vnd.openxmlformats-officedocument.presentationml.presentation when markitdown lacks the [pptx] extra, or when python-pptx imports fail (lxml incompatibility is the classic cause).","commonSituations":"Slide-deck ingestion services built on base markitdown; lxml version pins from other packages breaking python-pptx's import; Docker images cached from before the extras were added to the project.","solutions":["Install the pptx extra: pip install 'markitdown[pptx]'","Or: pip install 'markitdown[all]'","Test the underlying import: python -c \"import pptx\"; if it fails on lxml, align the lxml version (pip install -U lxml)","Pin markitdown[all] in deployment manifests to avoid per-format extras being forgotten"],"exampleFix":"# before\npip install markitdown\nMarkItDown().convert(\"deck.pptx\")  # MissingDependencyException\n\n# after\npip install 'markitdown[pptx]'\nMarkItDown().convert(\"deck.pptx\")","handlingStrategy":"try-catch","validationCode":"from markitdown.converters._pptx_converter import _dependency_exc_info\n\ndef can_convert_pptx() -> bool:\n    return _dependency_exc_info is None","typeGuard":null,"tryCatchPattern":"from markitdown import MarkItDown, MissingDependencyException\n\ntry:\n    result = MarkItDown().convert(\"deck.pptx\")\nexcept MissingDependencyException:\n    logger.error(\"install markitdown[pptx] to process PowerPoint files\")\n    raise","preventionTips":["Install markitdown[pptx] when slide ingestion is possible","Keep lxml versions compatible with python-pptx; test imports after dependency upgrades","Probe optional extras at app startup and fail fast with a clear message"],"tags":["dependencies","installation","pptx","optional-extras"],"backgroundTag":null,"analyzedSha":"fd239d5d2be43d9b68329730206b9312c7d5a388","analyzedAt":"2026-08-14T15:47:51.745Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}