You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
odfesql has been successfully installed with the following command: $ pip3 install odfe-sql-cli
When odfesql was executed, it was terminated with error message:
$ odfesql https://localhost:9200 --username admin --password admin
Traceback (most recent call last):
File "/home/hed/.local/bin/odfesql", line 5, in <module>
from odfe_sql_cli.main import cli
File "/home/hed/.local/lib/python3.9/site-packages/odfe_sql_cli/main.py", line 21, in <module>
from .esconnection import ESConnection
File "/home/hed/.local/lib/python3.9/site-packages/odfe_sql_cli/esconnection.py", line 22, in <module>
from elasticsearch import Elasticsearch, RequestsHttpConnection
File "/home/hed/.local/lib/python3.9/site-packages/elasticsearch/__init__.py", line 24, in <module>
from .client import Elasticsearch
File "/home/hed/.local/lib/python3.9/site-packages/elasticsearch/client/__init__.py", line 5, in <module>
from ..transport import Transport
File "/home/hed/.local/lib/python3.9/site-packages/elasticsearch/transport.py", line 5, in <module>
from .connection import Urllib3HttpConnection
File "/home/hed/.local/lib/python3.9/site-packages/elasticsearch/connection/__init__.py", line 2, in <module>
from .http_requests import RequestsHttpConnection
File "/home/hed/.local/lib/python3.9/site-packages/elasticsearch/connection/http_requests.py", line 3, in <module>
from base64 import decodestring
ImportError: cannot import name 'decodestring' from 'base64' (/usr/lib/python3.9/base64.py)
Workaround
The issue was fixed after modifying the following files:
Description of the issue
OS: Ubuntu 21.04
Python3 version: Python 3.9.4
odfesql has been successfully installed with the following command:
$ pip3 install odfe-sql-cli
When odfesql was executed, it was terminated with error message:
Workaround
The issue was fixed after modifying the following files:
~/.local/lib/python3.9/site-packages/elasticsearch/connection/http_requests.py
~/.local/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py
In both files the line
from base64 import decodestring
was replaced with
from base64 import decodebytes
After these changes
odfesql
utility has been run successfully:The text was updated successfully, but these errors were encountered: