Skip to content

KeyError: 'etag' crash - latest #1406

@Jayd603

Description

@Jayd603

This error happens when using s3cmd with latest s3 java libs on the server so it impacts other apps. AWS cli works fine of course

root@da4:~# s3cmd get s3://da4/file.enc /anypath/file.enc

Invoked as: /usr/local/bin/s3cmd get s3://da4/file.enc /anypath/file.enc
Problem: <class 'KeyError: 'etag'
S3cmd: 2.4.0
python: 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0]
environment LANG=en_US.UTF-8

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/s3cmd-2.4.0-py3.10.egg/EGG-INFO/scripts/s3cmd", line 3627, in
File "/usr/local/lib/python3.10/dist-packages/s3cmd-2.4.0-py3.10.egg/EGG-INFO/scripts/s3cmd", line 3524, in main
File "/usr/local/lib/python3.10/dist-packages/s3cmd-2.4.0-py3.10.egg/EGG-INFO/scripts/s3cmd", line 548, in cmd_object_get
File "/usr/local/lib/python3.10/dist-packages/s3cmd-2.4.0-py3.10.egg/S3/FileLists.py", line 552, in fetch_remote_list
_get_remote_attribs(uri, remote_item)
File "/usr/local/lib/python3.10/dist-packages/s3cmd-2.4.0-py3.10.egg/S3/FileLists.py", line 411, in _get_remote_attribs
'md5': response['headers']['etag'].strip('"''),
KeyError: 'etag'

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions