Bug 1894188 - ImportError: cannot import name 'decodestring' from 'base64'
Summary: ImportError: cannot import name 'decodestring' from 'base64'
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-elasticsearch
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Bruno
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-03 17:38 UTC by Nerijus Baliūnas
Modified: 2021-11-30 16:34 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-11-30 16:34:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nerijus Baliūnas 2020-11-03 17:38:06 UTC
When running elasticsearch-curator, which uses python3-elasticsearch-7.5.1-4.fc33.noarch, I get:

  File "/usr/bin/curator", line 33, in <module>
    sys.exit(load_entry_point('elasticsearch-curator==5.8.1', 'console_scripts', 'curator')())
  File "/usr/bin/curator", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/curator/__init__.py", line 6, in <module>
    from .utils import *
  File "/usr/lib/python3.9/site-packages/curator/utils.py", line 1, in <module>
    import elasticsearch
  File "/usr/lib/python3.9/site-packages/elasticsearch/__init__.py", line 24, in <module>
    from .client import Elasticsearch
  File "/usr/lib/python3.9/site-packages/elasticsearch/client/__init__.py", line 5, in <module>
    from ..transport import Transport
  File "/usr/lib/python3.9/site-packages/elasticsearch/transport.py", line 5, in <module>
    from .connection import Urllib3HttpConnection
  File "/usr/lib/python3.9/site-packages/elasticsearch/connection/__init__.py", line 2, in <module>
    from .http_requests import RequestsHttpConnection
  File "/usr/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/lib64/python3.9/base64.py)

After replacing "from base64 import decodestring" with "from base64 import decodebytes" in /usr/lib/python3.9/site-packages/elasticsearch/connection/http_requests.py and /usr/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py it works. See bug #1808508 for more info.

Comment 1 Ben Cotton 2021-11-04 17:23:25 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2021-11-30 16:34:00 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.