Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xcir opened this issue Mar 14, 2023 · 1 comment
Closed

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

xcir opened this issue Mar 14, 2023 · 1 comment

Comments

@xcir
Copy link
Contributor

xcir commented Mar 14, 2023

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.

xcir added a commit to xcir/s3cmd that referenced this issue Mar 14, 2023
fviard added a commit that referenced this issue Mar 14, 2023
@fviard fviard closed this as completed Mar 14, 2023
@fviard
Copy link
Contributor

fviard commented Mar 14, 2023

Thanks for the detailed report in addition of the fix :-)

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

No branches or pull requests

2 participants