#131 Error when synching with option --default-mime-type

Malfunction
closed-fixed
nobody
s3cmd (119)
3
2015-02-06
2013-02-02
No

INITIAL CONDITIONS:
1. Empty S3 bucket
2. Local directory $HOME/backup has files
-- OR --
1. S3 bucket has certain files
2. Local directory $HOME/backup has the same files as the S3 bucket plus a few other ones

ALSO:
3. $HOME is correctly defined
4. Using s3cmd-1.1.0-beta3 (error also replicated with beta2, though workaround not attempted with that version)
5. Server provided by Bluehost hosting

COMMAND (S3 bucket name redacted):
$HOME/bin/s3cmd-1.1.0-beta3/s3cmd --no-check-md5 --acl-private --delete-removed --bucket-location=us-west-1 --reduced-redundancy --default-mime-type --multipart-chunk-size-mb=20 sync $HOME/backup/ s3://redacted-bucket-name

RESULTING ERROR (home directory redacted from error message, changed to $HOME):
--------------------------------------------------------------------------------------------
WARNING: Module python-magic is not available. Guessing MIME types based on file extensions.

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

Problem: TypeError: unsupported operand type(s) for +: 'bool' and 'str'
S3cmd: 1.1.0-beta3

Traceback (most recent call last):
File "$HOME/bin/s3cmd-1.1.0-beta3/s3cmd", line 1800, in <module>
main()
File "$HOME/bin/s3cmd-1.1.0-beta3/s3cmd", line 1741, in main
cmd_func(args)
File "$HOME/bin/s3cmd-1.1.0-beta3/s3cmd", line 965, in cmd_sync
return cmd_sync_local2remote(args)
File "$HOME/bin/s3cmd-1.1.0-beta3/s3cmd", line 922, in cmd_sync_local2remote
response = s3.object_put(src, uri, extra_headers, extra_label = seq_label)
File "$HOME/bin/s3cmd-1.1.0-beta3/S3/S3.py", line 386, in object_put
request = self.create_request("OBJECT_PUT", uri = uri, headers = headers)
File "$HOME/bin/s3cmd-1.1.0-beta3/S3/S3.py", line 565, in create_request
request = S3Request(self, method_string, resource, headers, params)
File "$HOME/bin/s3cmd-1.1.0-beta3/S3/S3.py", line 68, in __init__
self.sign()
File "$HOME/bin/s3cmd-1.1.0-beta3/S3/S3.py", line 93, in sign
h += self.headers.get("content-type", "")+"\n"
TypeError: unsupported operand type(s) for +: 'bool' and 'str'

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

WORKAROUND:
Executing the exact same command but without the "--default-mime-type" switch works OK.

Discussion

  • Leandro Baca

    Leandro Baca - 2013-02-02
    • priority: 5 --> 3
     
  • Eric Drechsel

    Eric Drechsel - 2013-11-14

    I believe this is due to the --default-mime-type option being incorrectly set as a boolean (rather than a string). This change should fix it:

    https://github.com/s3tools/s3cmd/issues/243

    Also what is the relation between the sourceforge and github issue trackers, both of which are active?

     
  • Matt Domsch

    Matt Domsch - 2015-02-06

    The patch above was merged in Nov 2013. Closing.

     
  • Matt Domsch

    Matt Domsch - 2015-02-06
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks