Skip to content

fix: handle chart titles with no text_frame (#1958)#2044

Open
doitgo wants to merge 1 commit into
microsoft:mainfrom
doitgo:fix/issue-1958
Open

fix: handle chart titles with no text_frame (#1958)#2044
doitgo wants to merge 1 commit into
microsoft:mainfrom
doitgo:fix/issue-1958

Conversation

@doitgo
Copy link
Copy Markdown

@doitgo doitgo commented Jun 1, 2026

When a chart has has_title=True but chart_title.text_frame is None, the
converter raised AttributeError, which was silently swallowed by a broad
except Exception in _convert_chart_to_markdown, dropping valid chart data.

This change:

  • Adds a None check on text_frame before accessing .text
  • Applies the same fix to markitdown-ocr (PptxConverterWithOCR)
  • Adds regression tests in tests/test_module_misc.py

When a chart has has_title=True but chart_title.text_frame is None, the
converter raised AttributeError, which was silently swallowed by a broad
except Exception, dropping valid chart data.

Add a None check on text_frame and add regression tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant