Skip to content

bug: PptxConverter crashes when chart title has no text_frame (AttributeError) #1958

@hanhan761

Description

@hanhan761

Description

PptxConverter crashes with AttributeError when a chart title has no text frame. According to python-pptx docs, chart_title.text_frame can be None if the title was set via the text property rather than through the rich text frame API.

Root Cause

In _pptx_converter.py line 239:
chart.chart_title.text_frame returns None in some cases (e.g., charts where the title was set programmatically), causing AttributeError: NoneType object has no attribute text.

Expected Behavior

Charts without a text frame on the title should be handled gracefully - the title should be skipped rather than crashing the entire conversion.

Proposed Fix

Add a None check: if chart.has_title and chart.chart_title.text_frame is not None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions