KevinHuSh
commited on
Commit
·
2332381
1
Parent(s):
73e494f
fix bulk error for table method (#407)
Browse files### 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 +2 -2
- rag/utils/es_conn.py +1 -0
rag/app/table.py
CHANGED
@@ -223,8 +223,8 @@ def chunk(filename, binary=None, from_page=0, to_page=10000000000,
|
|
223 |
continue
|
224 |
if not str(row[clmns[j]]):
|
225 |
continue
|
226 |
-
|
227 |
-
|
228 |
fld = clmns_map[j][0]
|
229 |
d[fld] = row[clmns[j]] if clmn_tys[j] != "text" else huqie.qie(
|
230 |
row[clmns[j]])
|
|
|
223 |
continue
|
224 |
if not str(row[clmns[j]]):
|
225 |
continue
|
226 |
+
if pd.isna(row[clmns[j]]):
|
227 |
+
continue
|
228 |
fld = clmns_map[j][0]
|
229 |
d[fld] = row[clmns[j]] if clmn_tys[j] != "text" else huqie.qie(
|
230 |
row[clmns[j]])
|
rag/utils/es_conn.py
CHANGED
@@ -2,6 +2,7 @@ import re
|
|
2 |
import json
|
3 |
import time
|
4 |
import copy
|
|
|
5 |
import elasticsearch
|
6 |
from elastic_transport import ConnectionTimeout
|
7 |
from elasticsearch import Elasticsearch
|
|
|
2 |
import json
|
3 |
import time
|
4 |
import copy
|
5 |
+
|
6 |
import elasticsearch
|
7 |
from elastic_transport import ConnectionTimeout
|
8 |
from elasticsearch import Elasticsearch
|