First, please use a more recent version, such as upstream master branch, or my bug fix branch 'merge' branch.

Second, -EPIPE is fixed in the bug fix branch above, which is generally caused by piping the output of s3cmd into something (e.g. 's3cmd ... | head).  The 'head' program closes its stdin after N lines read, which closes s3cmd's stdout file descriptor, which then causes this failure.  This is fixed in the bugfix branch above by simply exiting without error when something closes its stdout file descriptor.


On Sat, Nov 30, 2013 at 9:17 PM, zachary baron <> wrote:
This popped up at the end of a dry run. I'm trying to get the 'exclude' function to work the way I want it to.

    An unexpected error has occurred.
  Please report the following lines to:

Problem: IOError: [Errno 32] Broken pipe
S3cmd:   1.0.0

Traceback (most recent call last):
  File "/usr/bin/s3cmd", line 2006, in <module>
  File "/usr/bin/s3cmd", line 1950, in main
  File "/usr/bin/s3cmd", line 1211, in cmd_sync
    return cmd_sync_local2remote(args)
  File "/usr/bin/s3cmd", line 1146, in cmd_sync_local2remote
    output(u"exclude: %s" % unicodise(key))
  File "/usr/bin/s3cmd", line 33, in output
    sys.stdout.write(message + "\n")
  File "/usr/lib/python2.7/", line 352, in write
IOError: [Errno 32] Broken pipe

    An unexpected error has occurred.
    Please report the above lines to:


Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!