[英]How to get all files from a Bucket - IBM Cloud Object Storage?
我想用 python 獲取我存儲桶中的所有文件。 我嘗試這種方式:
import ibm_boto3
from ibm_botocore.client import Config, ClientError
files = cos.Object(my_bucket_name).objects.all() # error here
但它顯示了這個錯誤:
ValueError (note: full exception trace is shown but execution is paused at: <module>)
Required parameter key not set
如何從存儲桶中獲取所有對象/文件?
對不起,我做錯了,正確的方法是這樣的:
files = cos.Bucket(bucket_name).objects.all()
問題解決了!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.