TypeError: string indices must be integers #124

Closed
mludvig opened this Issue Mar 1, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

mludvig commented Mar 1, 2013

From s3tools-bugs@...

s3cmd sync --dry-run --recursive BLAH/ s3://blah-blah-blah

I receive this error:


Problem: TypeError: string indices must be integers
S3cmd: 1.5.0-alpha1

Traceback (most recent call last):
File "/usr/local/bin/s3cmd", line 2037, in
main()
File "/usr/local/bin/s3cmd", line 1978, in main
cmd_func(args)
File "/usr/local/bin/s3cmd", line 1162, in cmd_sync
return cmd_sync_local2remote(args)
File "/usr/local/bin/s3cmd", line 1146, in cmd_sync_local2remote
destination_base_uri = _single_process(local_list)
File "/usr/local/bin/s3cmd", line 969, in _single_process
_child(destination_base, local_list)
File "/usr/local/bin/s3cmd", line 1075, in _child
output(u"remote copy: %s -> %s" % (dst1['object_key'], remote_list[dst2]['object_key']))
TypeError: string indices must be integers


Python 2.7.3
Ubuntu 12.04

mdomsch added a commit to mdomsch/s3cmd that referenced this issue Mar 1, 2013

fix sync --dry-run traceback, bug #124
Bug 124: s3tools#124

s3cmd sync --dry-run --recursive BLAH/ s3://blah-blah-blah
would traceback:

File "/usr/local/bin/s3cmd", line 1075, in _child
    output(u"remote copy: %s -> %s" % (dst1['object_key'],
    remote_list[dst2]['object_key']))
TypeError: string indices must be integers

In this case, dst1 and dst2, coming from copy_pairs, are themselves
the strings we want, not a lookup into a list.  So use them directly.

mludvig added a commit that referenced this issue Mar 2, 2013

Merge pull request #125 from mdomsch/bug/124
fix sync --dry-run traceback, bug #124
Contributor

mludvig commented Mar 2, 2013

Thanks Matt.

@mludvig mludvig closed this Mar 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment