Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 获取值尝试获取视频(blob)对象时出错';来自GCS存储桶的元数据_Python_Google Cloud Platform_Google Cloud Storage_Blobstore_Bucket - Fatal编程技术网

Python 获取值尝试获取视频(blob)对象时出错';来自GCS存储桶的元数据

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

运行此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
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对象