I believe this is fixed in the upstream github.com/s3tools/s3cmd master branch, or in my github.com/mdomsch/s3cmd merge branch.


On Tue, Nov 26, 2013 at 8:29 AM, Raul Reynoso <raul@spokenlayer.com> wrote:
I am experiencing errors about half of the time when I run s3cmd to sync a directory on s3.  I run on Ubuntu 12.04.  The command is

s3cmd --delete-removed --acl-public --cf-invalidate sync /local/path/ s3://mybucket.com/target/path/

The produced message is:

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:

Problem: NameError: global name 'arg' is not defined
S3cmd:   1.1.0-beta3

Traceback (most recent call last):
  File "/usr/bin/s3cmd", line 1800, in <module>
  File "/usr/bin/s3cmd", line 1741, in main
  File "/usr/bin/s3cmd", line 965, in cmd_sync
    return cmd_sync_local2remote(args)
  File "/usr/bin/s3cmd", line 955, in cmd_sync_local2remote
    result = cf.InvalidateObjects(uri, uploaded_objects_list)
  File "/usr/share/s3cmd/S3/CloudFront.py", line 428, in InvalidateObjects
    cfuri = self.get_dist_name_for_bucket(uri)
  File "/usr/share/s3cmd/S3/CloudFront.py", line 566, in get_dist_name_for_bucket
    raise ParameterError("Unable to translate S3 URI to CloudFront distribution name: %s" % arg)
NameError: global name 'arg' is not defined

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

Any help you could offer would be great.  



Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.