Python 获取值尝试获取视频(blob)对象时出错';来自GCS存储桶的元数据
运行此python脚本时Python 获取值尝试获取视频(blob)对象时出错';来自GCS存储桶的元数据,python,google-cloud-platform,google-cloud-storage,blobstore,bucket,Python,Google Cloud Platform,Google Cloud Storage,Blobstore,Bucket,运行此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> cou
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
ValueError:
无法转换为unicode
存储在bucket中的所有对象都是视频文件
如何获取存储在bucket中的视频文件的元数据
提前谢谢。谢谢各位,我解决了这个问题
storage_client = storage.Client()
bucket = storage_client.bucket('bucket_name')
blob1 = bucket.get_blob(blob.name)
print(blob1.name)
我应该传递blob.name来获取该对象的元数据,而不是blob对象