2013-05-12 97 views
1

當我運行s3cmd不完整的格式錯誤

$ s3cmd 

我得到

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

Problem: ValueError: incomplete format 
S3cmd: 1.0.1 

Traceback (most recent call last): 
    File "/usr/bin/s3cmd", line 2006, in <module> 
    main() 
    File "/usr/bin/s3cmd", line 1795, in main 
    cfg = Config(options.config) 
    File "/usr/lib/python2.7/site-packages/S3/Config.py", line 88, in __init__ 
    self.read_config_file(configfile) 
    File "/usr/lib/python2.7/site-packages/S3/Config.py", line 105, in read_config_file 
    cp = ConfigParser(configfile) 
    File "/usr/lib/python2.7/site-packages/S3/Config.py", line 142, in __init__ 
    self.parse_file(file, sections) 
    File "/usr/lib/python2.7/site-packages/S3/Config.py", line 170, in parse_file 
    print_value = (data["value"][:2]+"...%d_chars..."+data["value"][-1:]) % (len(data["value"]) - 3) 
ValueError: incomplete format 

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

任何人任何想法?

+0

原本我以爲這是由於Fedora的(在Ubuntu相同)蟒蛇更新...但它有特殊字符 – equivalent8 2013-05-23 12:42:52

回答

2

我發現問題在哪裏。

我配置s3cmd在s3cmd --config

s3cmd曾要求我爲GPG

$ s3cmd --configure 
... 
Encryption password is used to protect your files from reading 
by unauthorized persons while in transfer to S3 
Encryption password 

我已經建立了真正強大的密碼,包括非A-Z字符(如%)建立加密passphraze /密碼。 s3cmd --configure沒有逃過茨艾倫字符,因此被這樣產生的我的配置文件:

cat ~/.s3cfg 
... 
gpg_passphrase = examplepassword123%% 
... 

如果任何人有這樣的問題:要解決這個刪除s3cmd配置文件,然後再次運行配置,並設置密碼/ passpraze與AZ,az或0-9個字符只有

rm ~/.s3cfg 
s3cmd --configure 
+0

由於設置密碼與其說是由於!刪除〜/ .s3cfg是解決方案 – 2014-11-08 00:35:13

+0

:)我很高興它幫助你 – equivalent8 2014-11-10 15:04:16