From 09dd786674b1d3e1cb1102272f0612cdd9b6c9d7 Mon Sep 17 00:00:00 2001 From: Stephen Hu <812791840@qq.com> Date: Fri, 31 Oct 2025 10:07:56 +0800 Subject: [PATCH] Fix:KeyError: 'table_body' of mineru parser (#10773) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/10769 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- deepdoc/parser/mineru_parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deepdoc/parser/mineru_parser.py b/deepdoc/parser/mineru_parser.py index 1c757ca5b..89cc5ed69 100644 --- a/deepdoc/parser/mineru_parser.py +++ b/deepdoc/parser/mineru_parser.py @@ -394,7 +394,9 @@ class MinerUParser(RAGFlowPdfParser): case MinerUContentType.TEXT: section = output["text"] case MinerUContentType.TABLE: - section = output["table_body"] if "table_body" in output else "" + "\n".join(output["table_caption"]) + "\n".join(output["table_footnote"]) + section = output.get("table_body", "") + "\n".join(output.get("table_caption", [])) + "\n".join(output.get("table_footnote", [])) + if not section.strip(): + section = "FAILED TO PARSE TABLE" case MinerUContentType.IMAGE: section = "".join(output["image_caption"]) + "\n" + "".join(output["image_footnote"]) case MinerUContentType.EQUATION: