{"record":{"id":"aff7041c3c33b0cb","repo":"microsoft/markitdown","slug":"converter-recognized-the-input-as-a-potential-e-aff704","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-ocr/src/markitdown_ocr/_pptx_converter_with_ocr.py","lineNumber":61,"sourceCode":"\n        if extension == \".pptx\":\n            return True\n\n        if mimetype.startswith(\n            \"application/vnd.openxmlformats-officedocument.presentationml\"\n        ):\n            return True\n\n        return False\n\n    def convert(\n        self,\n        file_stream: BinaryIO,\n        stream_info: StreamInfo,\n        **kwargs: Any,\n    ) -> DocumentConverterResult:\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[1].with_traceback(\n                _dependency_exc_info[2]\n            )  # type: ignore[union-attr]\n\n        # Get OCR service (from kwargs or instance)\n        ocr_service: Optional[LLMVisionOCRService] = (\n            kwargs.get(\"ocr_service\") or self.ocr_service\n        )\n        llm_client = kwargs.get(\"llm_client\")\n\n        presentation = pptx.Presentation(file_stream)\n        md_content = \"\"\n        slide_num = 0","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/microsoft/markitdown/blob/fd239d5d2be43d9b68329730206b9312c7d5a388/packages/markitdown-ocr/src/markitdown_ocr/_pptx_converter_with_ocr.py#L43-L79","documentation":"The OCR-enabled PptxConverterWithOCR matched a .pptx stream, but the pptx extra's dependencies (python-pptx) could not be imported at module load. The stored exception is re-raised as MissingDependencyException in convert(), pointing at the [pptx] extra. Chaining via 'from' keeps the underlying ImportError visible for diagnosis.","triggerScenarios":"Converting a PowerPoint file through PptxConverterWithOCR when python-pptx is missing from the environment.","commonSituations":"Optional extras omitted during deployment, a fresh venv created from a requirements.txt that listed markitdown-ocr but not its extras, or dependency resolution conflicts that uninstalled python-pptx.","solutions":["pip install 'markitdown[pptx]' or 'markitdown[all]' in the runtime env","Verify: python -c \"import pptx\"","Inspect the chained ImportError to identify any secondary failure (e.g. a broken shared library)"],"exampleFix":"# before\npip install markitdown-ocr\nmd.convert(\"deck.pptx\")  # MissingDependencyException\n\n# after\npip install 'markitdown[pptx]'\nmd.convert(\"deck.pptx\")","handlingStrategy":"try-catch","validationCode":"import importlib.util\n\nassert importlib.util.find_spec(\"pptx\") is not None","typeGuard":null,"tryCatchPattern":"from markitdown import MissingDependencyException\n\ntry:\n    result = md.convert(pptx_stream, stream_info=StreamInfo(extension=\".pptx\"))\nexcept MissingDependencyException as e:\n    log.warning(\"pptx extras missing, skipping OCR: %s\", e)\n    raise","preventionTips":["Install 'markitdown[all]' in images that must handle arbitrary Office files","Check importability of python-pptx during container build, not at request time"],"tags":["missing-dependency","ocr","pptx","installation"],"backgroundTag":null,"analyzedSha":"fd239d5d2be43d9b68329730206b9312c7d5a388","analyzedAt":"2026-08-14T15:47:51.745Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}