microsoft/markitdown · error · MissingDependencyException
{converter} recognized the input as a potential {extension}
Error message
{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:
* pip install 'markitdown[{feature}]'
* pip install 'markitdown[all]'
* pip install 'markitdown[{feature}, ...]'
* etc. What it means
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.
Source
Thrown at packages/markitdown/src/markitdown/converters/_pptx_converter.py:69
if extension in ACCEPTED_FILE_EXTENSIONS:
return True
for prefix in ACCEPTED_MIME_TYPE_PREFIXES:
if mimetype.startswith(prefix):
return True
return False
def convert(
self,
file_stream: BinaryIO,
stream_info: StreamInfo,
**kwargs: Any, # Options to pass to the converter
) -> DocumentConverterResult:
# Check the dependencies
if _dependency_exc_info is not None:
raise MissingDependencyException(
MISSING_DEPENDENCY_MESSAGE.format(
converter=type(self).__name__,
extension=".pptx",
feature="pptx",
)
) from _dependency_exc_info[
1
].with_traceback( # type: ignore[union-attr]
_dependency_exc_info[2]
)
# Perform the conversion
presentation = pptx.Presentation(file_stream)
md_content = ""
slide_num = 0
for slide in presentation.slides:
slide_num += 1
View on GitHub (pinned to fd239d5d2b)
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
Example fix
# before
pip install markitdown
MarkItDown().convert("deck.pptx") # MissingDependencyException
# after
pip install 'markitdown[pptx]'
MarkItDown().convert("deck.pptx") Defensive patterns
Strategy: try-catch
Validate before calling
from markitdown.converters._pptx_converter import _dependency_exc_info
def can_convert_pptx() -> bool:
return _dependency_exc_info is None Try / catch
from markitdown import MarkItDown, MissingDependencyException
try:
result = MarkItDown().convert("deck.pptx")
except MissingDependencyException:
logger.error("install markitdown[pptx] to process PowerPoint files")
raise Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- {converter} recognized the input as a potential {extension}
- {converter} recognized the input as a potential {extension}
- {converter} recognized the input as a potential {extension}
- {converter} recognized the input as a potential {extension}
- {converter} recognized the input as a potential {extension}
AI-assisted analysis of microsoft/markitdown@fd239d5d2b (2026-08-14).
Data as JSON: /api/errors/b749f6c865ff5006.
Report an issue: GitHub.