Skip to content

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

fix: improve HTML code handling and logging in batch_analyze and main modules

myhlolie2fd4917605f
diff --git a/mineru/backend/pipeline/batch_analyze.py b/mineru/backend/pipeline/batch_analyze.py
index f1fdff7b..247895b4 100644
--- a/mineru/backend/pipeline/batch_analyze.py
+++ b/mineru/backend/pipeline/batch_analyze.py
@@ -221,7 +221,7 @@ class BatchAnalyze:
# 表格格式清理
for table_res_dict in table_res_list_all_page:
- html_code = table_res_dict["table_res"].get("html", "")
+ html_code = table_res_dict["table_res"].get("html", "") or ""
# 检查html_code是否包含'<table>'和'</table>'
if "<table>" in html_code and "</table>" in html_code:
diff --git a/mineru/model/table/rec/unet_table/main.py b/mineru/model/table/rec/unet_table/main.py
index 34857990..7fd64b58 100644
--- a/mineru/model/table/rec/unet_table/main.py
+++ b/mineru/model/table/rec/unet_table/main.py
@@ -337,5 +337,5 @@ class UnetTableModel:
return html_code
except Exception as e:
- logger.exception(e)
- return None
+ logger.warning(e)
+ return wireless_html_code