0

我已经在我的机器上安装了 s3cmd,它是 ubuntu 11.10,当我尝试从 s3 下载一些数据时,它给了我这个错误,我还使用我拥有的访问密钥配置了 s3cmd(.s3cfg 文件在主文件夹中)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4

1 回答 1

1

请尝试更新版本的 s3cmd,例如昨晚在 SourceForge 或 github 上的 s3tools 项目上发布的 1.5.0-alpha2。在这种特定情况下,您正在尝试下载一个长度为 0 的文件,这会触发此错误

于 2013-03-05T13:18:24.300 回答