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

s3 resource has no attribute 'Object' in boto3 0.0.7 #56

Closed
amattie opened this issue Feb 6, 2015 · 4 comments
Closed

s3 resource has no attribute 'Object' in boto3 0.0.7 #56

amattie opened this issue Feb 6, 2015 · 4 comments
Assignees
Labels
documentation This is a problem with documentation. pending-release This issue will be fixed by an approved PR that hasn't been released yet. question

Comments

@amattie
Copy link

amattie commented Feb 6, 2015

I just upgraded to boto3 0.0.7, and now I'm getting an error when trying to call s3.Object().

s3 = boto3.resource('s3')
obj = s3.Object('my-bucket', 'my-key')

That throws an AttributeError: "AttributeError: 's3' object has no attribute 'Object'"

If I go back to 0.0.6 or 0.0.5, I have no problems accessing s3.Object.

Was there a breaking change here? I didn't see anything in the release notes or changes in the docs.

@danielgtaylor danielgtaylor added question documentation This is a problem with documentation. labels Feb 6, 2015
@danielgtaylor danielgtaylor self-assigned this Feb 6, 2015
@danielgtaylor
Copy link
Member

@amattie sorry, the switch to the new resource JSON format (which is shared among AWS SDKs) includes a change in the organization of subresources. I will try to call out the change better in the changelog, and make sure the examples in the documentation are up to date. Here is the one and only way to get an S3 object now:

import boto3

s3 = boto3.resource('s3')
obj = s3.Bucket('my-bucket').Object('my-key')

@danielgtaylor
Copy link
Member

@amattie I've added some clarification to the changelog and release notes about this. I have a question for you before I update the docs - do you prefer one style over the other?

@danielgtaylor
Copy link
Member

I've created a pull request #60 to address this. We will be exposing the previous behavior again after some though on the subject. Version 0.0.8, when released, should address this issue.

@danielgtaylor danielgtaylor added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Feb 10, 2015
@danielgtaylor
Copy link
Member

This is now released in 0.0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. pending-release This issue will be fixed by an approved PR that hasn't been released yet. question
Projects
None yet
Development

No branches or pull requests

2 participants