I want to get all files that are in my bucket with python. I trying this way:
import ibm_boto3
from ibm_botocore.client import Config, ClientError
files = cos.Object(my_bucket_name).objects.all() # error here
But it shows this error:
ValueError (note: full exception trace is shown but execution is paused at: <module>)
Required parameter key not set
How do I get all objects/files from the bucket?
Sorry, I was doing it wrong, the correct way is like this:
files = cos.Bucket(bucket_name).objects.all()
Problem solved!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.