【问题标题】:S3cmd not working in ubuntuS3cmd 在 ubuntu 中不起作用
【发布时间】:2013-03-05 12:07:45
【问题描述】:

我在我的机器上安装了 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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

【问题讨论】:

  • 您是否将错误报告给 s3tools-bugs@lists.sourceforge.net ?
  • 是的 .. 我已经通过电子邮件发送了关于这个 id 的问题。
  • 最新版本 S3cmd: 1.5.0-alpha1 也会发生这种情况

标签: ruby-on-rails amazon-s3 ubuntu-11.10 s3cmd


【解决方案1】:

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

【讨论】:

  • 升级到 S3cmd:1.5.0-alpha2 后仍然报同样的错误
猜你喜欢
  • 1970-01-01
  • 2013-01-21
  • 2017-04-05
  • 2023-03-12
  • 2015-10-19
  • 2014-06-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多