Skip to content

"TypeError: string indices must be integers" in dry-run #1313

@xcir

Description

@xcir

An error occurred during the dry run execution.

My Environment

OS: Ubuntu 20.04.4(focal)
Python: 3.8.10
s3cmd rev: 6f3e1ba

Traceback

Invoked as: ./s3cmd sync --follow-symlinks --files-from=- -c /**** --list-allow-unordered --dry-run /**** s3://****
Problem: <class 'TypeError: string indices must be integers
S3cmd:   2.3.0-dev
python:   3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0]
environment LANG=C

Traceback (most recent call last):
  File "./s3cmd", line 3461, in <module>
    rc = main()
  File "./s3cmd", line 3358, in main
    rc = cmd_func(args)
  File "./s3cmd", line 2149, in cmd_sync
    return cmd_sync_local2remote(args)
  File "./s3cmd", line 2116, in cmd_sync_local2remote
    ret = _single_process(args[:-1])
  File "./s3cmd", line 1863, in _single_process
    return _child(destination_base, source_args)
  File "./s3cmd", line 2012, in _child
    output(u"remote copy: '%s' -> '%s'" % (relative_file['copy_src'], relative_file))
TypeError: string indices must be integers

Possible Solution

s3cmd/s3cmd

Lines 2011 to 2012 in f8eafbb

for relative_file, item in copy_pairs.items():
output(u"remote copy: '%s' -> '%s'" % (relative_file['copy_src'], relative_file))

Maybe "item['copy_src']" is correct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions