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

Trying to set metadata results in error (Python 3) #229

Open
alexanderaltanis opened this issue Jan 12, 2022 · 0 comments
Open

Trying to set metadata results in error (Python 3) #229

alexanderaltanis opened this issue Jan 12, 2022 · 0 comments

Comments

@alexanderaltanis
Copy link

When trying to set metadata for a set of files I want to upload, I get the following error:

[Exception] 'dict' object has no attribute 'iteritems'
Exception in thread Thread-1:ad(s)]
Traceback (most recent call last):
  File "/home/username/.local/bin/s4cmd.py", line 520, in run
    self.__class__.__dict__[func_name](self, *args, **kargs)
  File "/home/username/.local/bin/s4cmd.py", line 129, in wrapper
    ret = func(*args, **kargs)
  File "/home/username/.local/bin/s4cmd.py", line 1332, in upload
    self.s3.put_object(Bucket=s3url.bucket,
  File "/home/username/.local/bin/s4cmd.py", line 399, in wrapped_method
    merged_kargs = self.merge_opt_params(method, kargs)
  File "/home/username/.local/bin/s4cmd.py", line 432, in merge_opt_params
    for k, v in getattr(self.opt, key).iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
[...]

.iteritems has been removed from dict in Python 3.

I tried just changing it locally to .items and that worked, but I'd rather let you fix it :)

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

No branches or pull requests

1 participant