From 800b5c7aaa6e6cfe8fa889bfc6bb01f6c8267c6a Mon Sep 17 00:00:00 2001
From: KevinHuSh <kevinhu.sh@gmail.com>
Date: Wed, 17 Apr 2024 12:17:14 +0800
Subject: [PATCH] fix bulk error for table method (#407)

### What problem does this PR solve?


Issue link:#366

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
---
 rag/app/table.py     | 4 ++--
 rag/utils/es_conn.py | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/rag/app/table.py b/rag/app/table.py
index aca1bbf..29fa254 100644
--- a/rag/app/table.py
+++ b/rag/app/table.py
@@ -223,8 +223,8 @@ def chunk(filename, binary=None, from_page=0, to_page=10000000000,
                     continue
                 if not str(row[clmns[j]]):
                     continue
-                #if pd.isna(row[clmns[j]]):
-                #    continue
+                if pd.isna(row[clmns[j]]):
+                    continue
                 fld = clmns_map[j][0]
                 d[fld] = row[clmns[j]] if clmn_tys[j] != "text" else huqie.qie(
                     row[clmns[j]])
diff --git a/rag/utils/es_conn.py b/rag/utils/es_conn.py
index 2dd02bd..a3ceaf3 100644
--- a/rag/utils/es_conn.py
+++ b/rag/utils/es_conn.py
@@ -2,6 +2,7 @@ import re
 import json
 import time
 import copy
+
 import elasticsearch
 from elastic_transport import ConnectionTimeout
 from elasticsearch import Elasticsearch
-- 
GitLab