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

'async for' requires an object with __aiter__ method, got s3.Bucket.objectsCollection #188

Closed
parinmaru2 opened this issue Feb 16, 2020 · 3 comments

Comments

@parinmaru2
Copy link

parinmaru2 commented Feb 16, 2020

  • Async AWS SDK for Python version: aioboto3-6.3.0
  • Python version: Python3.6
  • Operating System: Linux

Problem:

I am using aioboto3 to create s3 resource.
And then I call s3 objects filter method:

my_bucket = self.s3_resource.Bucket(bucket_name)
response = my_bucket.objects.filter(Prefix=remote_directory_prefix)

I can't loop/iterate over this response:

async for r in response:

Above async for throws this exception:
'async for' requires an object with aiter method, got s3.Bucket.objectsCollection

Analysis
It seems s3.Bucket.objectsCollection doesn't implement aiter() method

@terricain
Copy link
Owner

Think this'll be solved by either #181 or #186

@terricain
Copy link
Owner

Should be fixed by v6.5.0 can you test it out? If it doesn't work can you reopen this ticket with the issue.

@parinmaru2
Copy link
Author

Should be fixed by v6.5.0 can you test it out? If it doesn't work can you reopen this ticket with the issue.

Thanks @terrycain
Tested with latest version and this seems to have been fixed. Thanks again.

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

2 participants