用python的es包写DSL的时候,报
elasticsearch.exceptions.RequestError: <exception str() failed>
是因为DSL的版本和ES的版本不对应。‘
我出现这个问题是因为使用6.X版本的包查询1.X版本的es
https://stackoverflow.com/questions/47235394/python-elasticsearch-exceptions-requesterror
解决方法
pip uninstall elasticsearch-dsl
pip install "elasticsearch-dsl<2.0.0"
本文解决了Python的Elasticsearch DSL包版本与ES服务器版本不匹配的问题,具体为6.X版本的包无法查询1.X版本的ES。通过安装指定版本的elasticsearch-dsl包,成功解决了RequestError异常。

5万+

被折叠的 条评论
为什么被折叠?



