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.Bucket has no attribute load #102

Closed
jstewmon opened this issue Apr 22, 2015 · 3 comments
Closed

s3.Bucket has no attribute load #102

jstewmon opened this issue Apr 22, 2015 · 3 comments
Assignees
Labels
bug This issue is a confirmed bug.

Comments

@jstewmon
Copy link

Attempting to load the bucket's creation_date results in a ResourceLoadException.

>>> import sys
>>> sys.version
'2.7.6 (default, Sep  9 2014, 15:04:36) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]'
>>> import boto3
>>> s3 = boto3.resource('s3')
>>> b = s3.Bucket('mybucket')
>>> b.name
'mybucket'
>>> b.creation_date
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/boto3/resources/factory.py", line 202, in property_loader
    '{0} has no load method'.format(self.__class__.__name__))
boto3.exceptions.ResourceLoadException: s3.Bucket has no load method
$ pip show boto3

---
Name: boto3
Version: 0.0.15
@jamesls
Copy link
Member

jamesls commented Apr 22, 2015

Confirmed, thanks for reporting.

@jamesls jamesls self-assigned this Apr 22, 2015
@jamesls jamesls added the bug This issue is a confirmed bug. label Apr 22, 2015
@jamesls
Copy link
Member

jamesls commented Jun 5, 2015

Following up on this issue:

The underlying issue here is that there is no API to directly get a single bucket's creation_date. The best we can do is approximate this by doing a ListBuckets call (which gives a list of all your buckets and their creation dates) and finding the appropriate bucket.

@jamesls
Copy link
Member

jamesls commented Jun 23, 2015

Fixed via #128

@jamesls jamesls closed this as completed Jun 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants