0

I have Installed s3cmd on my machine which is ubuntu 11.10 and when i am trying to download some data from s3 it gives me this error, I have also configure s3cmd with the access keys which i have (.s3cfg file is there in home folder)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please report the following lines to:
   s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Problem: KeyError: 'content-length'
S3cmd:   1.0.0

Traceback (most recent call last):
  File "/usr/bin/s3cmd", line 2006, in <module>
    main()
  File "/usr/bin/s3cmd", line 1950, in main
    cmd_func(args)
  File "/usr/bin/s3cmd", line 513, in cmd_object_get
    response = s3.object_get(uri, dst_stream, start_position = start_position, extra_label = seq_label)
  File "/usr/share/s3cmd/S3/S3.py", line 285, in object_get
    response = self.recv_file(request, stream, labels, start_position)
  File "/usr/share/s3cmd/S3/S3.py", line 691, in recv_file
    size_left = int(response["headers"]["content-length"])
KeyError: 'content-length'

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
    Please report the above lines to:
   s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
benchwarmer
  • 2,764
  • 23
  • 25
RailsEnthusiast
  • 1,251
  • 2
  • 12
  • 18

1 Answers1

1

Please try a newer version of s3cmd, such as 1.5.0-alpha2 released last night on the s3tools project on SourceForge or in github. In this specific case, you are trying to download a 0-length file, which triggers this bug

Matt Domsch
  • 486
  • 2
  • 5