版本修改
This commit is contained in:
@@ -6,6 +6,10 @@ import pandas as pd
|
||||
from elasticsearch import helpers
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
import os
|
||||
# 🛡️ 极其重要:必须在导入 goojia_utils 之前禁用 ES 8.x 的兼容性 Content-Type 头部请求!
|
||||
# 这样客户端就会使用普通的 'application/json' 头部,彻底解决低版本 Elasticsearch 报错 406 的故障。
|
||||
os.environ["ELASTIC_CLIENT_APIVERSIONING"] = "0"
|
||||
|
||||
flag = False
|
||||
for province in areautils.get_all_province():
|
||||
|
||||
Reference in New Issue
Block a user