Skip to content

Fix text handling in PPTX converter#1819

Open
kelvinelove wants to merge 1 commit intomicrosoft:mainfrom
kelvinelove:patch-1
Open

Fix text handling in PPTX converter#1819
kelvinelove wants to merge 1 commit intomicrosoft:mainfrom
kelvinelove:patch-1

Conversation

@kelvinelove
Copy link
Copy Markdown

fix: handle None text in PptxConverter to prevent TypeError

Fixes #1808

When PowerPoint slides contain None text values (from malformed shapes or third-party-generated PPTX files), PptxConverter would crash with: "TypeError: can only concatenate str (not 'NoneType') to str"

Updated three lines to safely handle None values using the or "" pattern:

  • Line 165: Title text concatenation
  • Line 167: Shape text concatenation
  • Line 197: Notes frame text concatenation

This ensures that a single malformed shape no longer fails the entire file conversion.

fix: handle None text in PptxConverter to prevent TypeError

Fixes microsoft#1808

When PowerPoint slides contain None text values (from malformed shapes or
third-party-generated PPTX files), PptxConverter would crash with:
"TypeError: can only concatenate str (not 'NoneType') to str"

Updated three lines to safely handle None values using the `or ""` pattern:
- Line 165: Title text concatenation
- Line 167: Shape text concatenation  
- Line 197: Notes frame text concatenation

This ensures that a single malformed shape no longer fails the entire file conversion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PptxConverter: TypeError "can only concatenate str (not NoneType) to str" when shape/notes text is None

1 participant