2013-03-05 88 views
0

我已經在我的機器上安裝了s3cmd,這是Ubuntu 11.10,當我試圖從s3下載一些數據時,它給了我這個錯誤,我也配置了s3cmd和我擁有的訪問密鑰(。 s3cfg文件是在有主文件夾)S3cmd不能在ubuntu工作

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
    An unexpected error has occurred. 
    Please report the following lines to: 
    [email protected] 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 

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: 
    [email protected] 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
+0

您是否將錯誤報告給[email protected]? – 2013-03-05 12:17:56

+0

是的..我已經通過電子郵件發送了關於這個ID的問題。 – RailsEnthusiast 2013-03-05 13:01:13

+0

S3cmd的最新版本也會發生這種情況:1.5.0-alpha1 – RailsEnthusiast 2013-03-05 14:14:29

回答

1

請嘗試s3cmd的新版本,昨晚發佈了在SourceForge上或GitHub上的s3tools項目如1.5.0-α-2。在這種特殊情況下,您正試圖下載0長度的文件,這會觸發此錯誤

+0

將版本升級到S3cmd後仍然出現相同的錯誤:1.5.0-alpha2 – RailsEnthusiast 2013-03-11 13:31:41