lundi 1 juin 2015

AttributeError: 'NoneType' object has no attribute 'set_acl'

Im trying to make a file public inside a bucket but Im having this error:

AttributeError: 'NoneType' object has no attribute 'set_acl'

Do you see something wrong in the code?

def makeFilePublic(bucketName):
    s3 = boto.s3.connect_to_region('us-east-1') 
    bucket = s3.get_bucket(bucketName)
    key = bucket.lookup('uploadedfiles/part-00000')
    key.set_acl('public-read')




Aucun commentaire:

Enregistrer un commentaire