Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

feat: add error handling for chart HTML extraction to improve robustness

myhloli981526064405
diff --git a/mineru/model/pptx/pptx_converter.py b/mineru/model/pptx/pptx_converter.py
index 274921ea..f417a76c 100644
--- a/mineru/model/pptx/pptx_converter.py
+++ b/mineru/model/pptx/pptx_converter.py
@@ -600,7 +600,12 @@ class PptxConverter:
except Exception as e:
logger.warning(f"Warning: chart workbook cannot be loaded: {e}")
- chart_html = extract_chart_html_from_ooxml(chart_xml, workbook_bytes)
+ try:
+ chart_html = extract_chart_html_from_ooxml(chart_xml, workbook_bytes)
+ except Exception as e:
+ logger.warning(f"Warning: chart HTML cannot be extracted: {e}")
+ return
+
if not chart_html:
return