运行此python脚本时
storage_client = storage.Client()
bucket = storage_client.bucket('bucket_name')
blob1 = bucket.get_blob(blob)
print(blob1.name)
收到以下错误:
ValueError: <Blob: bucket-name, /videos/batch1TestingVideo1/video1.mp4, 1600346932097827>
could not be converted to unicode
存储在桶中的所有对象都是视频文件。
如何获取存储桶中存储的视频文件的元数据。
提前致谢。
谢谢大家 我找到了问题
storage_client = storage.Client()
bucket = storage_client.bucket('bucket_name')
blob1 = bucket.get_blob(blob.name)
print(blob1.name)
而不是 blob 对象,我应该通过 blob.name 来获取该对象的元数据
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句