Skip to content

OCR PPTX converter crashes on SVG images without a raster fallback #2399

Closed

Description

@keeltrace

Summary

PptxConverterWithOCR still crashes on SVG pictures that do not have a raster fallback, even though the core PptxConverter was fixed for this in #2233.

Current OCR path:

if self._is_picture(shape):
    image_stream = io.BytesIO(shape.image.blob)

For an SVG-only picture, python-pptx raises ValueError("no embedded image") when shape.image is accessed. The core converter now resolves the <asvg:svgBlip> relationship directly, but the OCR converter does not use that helper/path.

Reproduction on current main

I used the repository's existing regression fixture:

packages/markitdown/tests/test_files/test_svg_no_fallback.pptx

In a clean local venv with the source packages installed:

core 57
ocr error ValueError 'no embedded image'

So the same file that proves #2233 fixed the core converter still fails through PptxConverterWithOCR.

Proposed scope

If this is available to take, I can send a focused OCR-only follow-up that reuses the core converter's SVG image-resolution behavior where practical and adds an OCR-side regression test using the existing fixture. No unrelated PPTX refactor.

I searched open and closed issues/PRs for an OCR-specific SVG/no-raster-fallback fix and found no matching implementation.

AI-assisted audit disclosure: found by comparing recent merged core-converter fixes against sibling OCR converters; reproduction was executed locally against current source.

Activity

  1. afourney commented on Sep 30, 2026

    @afourney
    Member

    Thank you for reporting this and identifying the SVG-only fixture.

    This is addressed by #2506, included in v0.1.8. The PPTX OCR converter now inherits the core SVG image-resolution path, avoiding the shape.image crash when no raster fallback is present. The SVG-only regression passes against v0.1.8.

    Please upgrade both markitdown to 0.1.8 and markitdown-ocr to 0.1.1. Closing as fixed. Please reopen this issue if the problem still occurs with those versions, and include a reproduction so we can investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions