python连接ES,elasticsearch.ApiError: ApiError(406报错解决
elasticsearch.ApiError: ApiError(406, ‘Content-Type header [application/vnd.elasticsearch+x-ndjson; compatible-with=8] is not supported’, ‘Content-Type header [application/vnd.elasticsearch+x-ndjson;
·
elasticsearch.ApiError: ApiError(406, ‘Content-Type header [application/vnd.elasticsearch+x-ndjson; compatible-with=8] is not supported’, ‘Content-Type header [application/vnd.elasticsearch+x-ndjson; compatible-with=8] is not supported’)
解决办法
1.需要把elasticsearch安装版本和python Elasticsearch第三方库(模块)版本保持一致就可以解决
查看服务器安装版本
查看第三方库(模块)版本
2.不一致则对第三方库(模块)进行升级或者降级,从而达到一致
更多推荐
已为社区贡献2条内容
所有评论(0)