SIGN IN SIGN UP

fix(pptx): handle NotImplementedError from shape.shape_type (#3309)

* fix(pptx): handle NotImplementedError from shape.shape_type

python-pptx raises NotImplementedError from Shape.shape_type for
<p:sp> elements that aren't placeholders, autoshapes, textboxes, or
freeforms (e.g. shapes with empty <p:spPr> from Google Slides exports,
LibreOffice, or Keynote). handle_groups() and handle_shapes() access
shape_type without catching this, crashing the entire conversion.

Add a _safe_shape_type() helper that returns None on
NotImplementedError, so unrecognized shapes skip only the GROUP
recursion and PICTURE extraction while text and table extraction
proceed normally.

Fixes #3308

Signed-off-by: Tejas Patel <tejas226@hotmail.com>

* Fix lint

Signed-off-by: Tejas Patel <tejas226@hotmail.com>

---------

Signed-off-by: Tejas Patel <tejas226@hotmail.com>
P
pateltejas committed
043ed2dd3d0536b76016b2ac99ebdb11d6433767
Parent: 8ec14f2
Committed by GitHub <noreply@github.com> on 4/17/2026, 4:59:48 AM