Ver código fonte

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

myhloli 2 meses atrás
pai
commit
e2fd491760

+ 1 - 1
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:

+ 2 - 2
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