This was fixed in 
commit a845140fd7f3dc0301299faa376e1fb750f7ec4e
Author: Kelly McLaughlin <>
Date:   Wed Feb 29 16:19:19 2012 -0700

    Handle empty return bodies when processing S3 errors.

    Currently error commands that do not return a body cause
    s3cmd to output an ugly backtrace. This change checks to
    see if the data field of the response is non-empty before
    calling `getTreeFromXml` on it. An example of an offending
    command is using `s3cmd info` on a nonexistent object.

This is thus fixed in the whole 1.5.0-{alpha,beta} series and in the upstream master branch.


On Fri, Jan 31, 2014 at 4:48 PM, Matt Domsch <> wrote:
S3 returned an empty error document.  This happens from time to time.  Nothing to see here.  Try again later.

On Fri, Jan 31, 2014 at 9:25 AM, Саша Щербаков <> wrote:
    An unexpected error has occurred.
  Please report the following lines to:

Problem: ParseError: no element found: line 1, column 0
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 631, in cmd_info
    info = s3.object_info(uri)
  File "/usr/share/s3cmd/S3/", line 324, in object_info
    response = self.send_request(request)
  File "/usr/share/s3cmd/S3/", line 511, in send_request
    raise S3Error(response)
  File "/usr/share/s3cmd/S3/", line 48, in __init__
    tree = getTreeFromXml(response["data"])
  File "/usr/share/s3cmd/S3/", line 66, in getTreeFromXml
    tree = ET.fromstring(xml)
  File "/usr/lib/python2.7/xml/etree/", line 1302, in XML
    return parser.close()
  File "/usr/lib/python2.7/xml/etree/", line 1655, in close
  File "/usr/lib/python2.7/xml/etree/", line 1507, in _raiseerror
    raise err
ParseError: no element found: line 1, column 0

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

WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.