Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class 'AttributeError: module 'base64' has no attribute 'encodestring' #1161

Closed
jamieburchell opened this issue Dec 6, 2020 · 4 comments
Closed

Comments

@jamieburchell
Copy link

Problem: <class 'AttributeError: module 'base64' has no attribute 'encodestring'
S3cmd:   2.1.0
python:   3.9.0 (default, Nov 30 2020, 13:01:15) 
[GCC 8.4.0]
environment LANG=en_US.UTF-8

Traceback (most recent call last):
  File "/opt/bin/s3cmd", line 3121, in <module>
    rc = main()
  File "/opt/bin/s3cmd", line 3030, in main
    rc = cmd_func(args)
  File "/opt/bin/s3cmd", line 1898, in cmd_sync
    return cmd_sync_local2remote(args)
  File "/opt/bin/s3cmd", line 1871, in cmd_sync_local2remote
    ret = _single_process(args[:-1])
  File "/opt/bin/s3cmd", line 1625, in _single_process
    return _child(destination_base, source_args)
  File "/opt/bin/s3cmd", line 1809, in _child
    subcmd_batch_del(remote_list = remote_list)
  File "/opt/bin/s3cmd", line 743, in subcmd_batch_del
    _batch_del(remote_list)
  File "/opt/bin/s3cmd", line 719, in _batch_del
    response = s3.object_batch_delete(to_delete)
  File "/opt/lib/python3.9/site-packages/S3/S3.py", line 732, in object_batch_delete
    self.object_batch_delete_uri_strs(uris)
  File "/opt/lib/python3.9/site-packages/S3/S3.py", line 757, in object_batch_delete_uri_strs
    headers = SortedDict({'content-md5': compute_content_md5(request_body),
  File "/opt/lib/python3.9/site-packages/S3/S3.py", line 1831, in compute_content_md5
    base64md5 = base64.encodestring(m.digest())
AttributeError: module 'base64' has no attribute 'encodestring'

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  above lines (removing any private
  info as necessary) to:
   [email protected]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@jamieburchell
Copy link
Author

I see this was resolved by changes in master

@alanorth
Copy link

Fixed by: 44cc1a9

@ttcremers
Copy link

Fixed by: 44cc1a9

In which version will this be released? Thanks

@sorenwacker
Copy link

sorenwacker commented Jun 3, 2024

I still got this error. Installed s3cmd with conda, Python 3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants