s3tools / s3cmd

Official s3cmd repo -- Command line tool for managing S3 compatible storage services (including Amazon S3 and CloudFront).
https://s3tools.org/s3cmd
GNU General Public License v2.0
4.61k stars 906 forks source link

KeyError: 'etag' crash - latest #1406

Open Jayd603 opened 4 days ago

Jayd603 commented 4 days ago

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.

fviard commented 4 days ago

What is the server that you are using? Would you mind running the command with the -d flag to see what is happening when it crashes?

Jayd603 commented 4 days ago

s3cmd_debug.txt