microsoft / microsoft/markitdown
OCR PPTX converter still crashes when shape or notes text is None
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
Summary
The core PptxConverter was fixed by #2059 to tolerate shape.text is None and notes_text_frame.text is None, but the parallel PptxConverterWithOCR on current main still has the original unsafe accesses:
md_content += "# " + shape.text.lstrip() + "\\n"
md_content += shape.text + "\\n"
...
md_content += notes_frame.text
This appears to be a missed sibling fix. PR #1928 previously covered both converters, but it was closed after #2059 was expected to cover the cases together. The merged #2059 changed only packages/markitdown/src/markitdown/converters/_pptx_converter.py; current packages/markitdown-ocr/src/markitdown_ocr/_pptx_converter_with_ocr.py remains vulnerable.
Impact
The same python-pptx inputs described in #1808 can still raise TypeError when users enable the OCR plugin, even though the normal converter now handles them.
Proposed scope
If this is available to take, I can send a focused follow-up that mirrors #2059 in the OCR converter only and adds OCR-side regression coverage for None shape and notes text. No refactor or unrelated cleanup.
I searched current open/closed PRs and issues for the OCR-specific case; the only exact prior implementation I found is the closed, unmerged #1928.
AI-assisted audit disclosure: this gap was found by comparing recent merged fixes against sibling converter implementations.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/markitdown-ocr/src/markitdown_ocr/_pptx_converter_with_ocr.py and compare its unsafe shape and notes text accesses with the handling merged in #2059. Add OCR-side regression coverage using the python-pptx inputs described in #1808. Done means the OCR converter no longer raises TypeError when shape or notes text is None.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100