无法启动
Closed this issue · 1 comments
BraveSail commented
2021-04-15T14:44:35.189617933Z from .client import Elasticsearch
2021-04-15T14:44:35.189621733Z File "/usr/local/lib/python3.9/site-packages/elasticsearch/client/__init__.py", line 4, in <module>
2021-04-15T14:44:35.189740314Z from ..transport import Transport
2021-04-15T14:44:35.189750983Z File "/usr/local/lib/python3.9/site-packages/elasticsearch/transport.py", line 5, in <module>
2021-04-15T14:44:35.189798703Z from .connection import Urllib3HttpConnection
2021-04-15T14:44:35.189805923Z File "/usr/local/lib/python3.9/site-packages/elasticsearch/connection/__init__.py", line 2, in <module>
2021-04-15T14:44:35.189923563Z from .http_requests import RequestsHttpConnection
2021-04-15T14:44:35.189934563Z File "/usr/local/lib/python3.9/site-packages/elasticsearch/connection/http_requests.py", line 3, in <module>
2021-04-15T14:44:35.190033783Z from base64 import decodestring
2021-04-15T14:44:35.190044343Z ImportError: cannot import name 'decodestring' from 'base64' (/usr/local/lib/python3.9/base64.py)
EYHN commented
This is because decodestring
has been deleted since python3.9.
The easiest way to solve this problem is to downgrade python to 3.8.
If you are using docker, modify the first line of the dockerfile
to FROM python:3.8
, and rebuild the docker image.
Or you can upgrade the elasticsearch dependency library if you understand what you are doing.