小编Vin*_*dey的帖子

将 <type 'google.protobuf.pyext._message.RepeatedScalarContainer'> 转换为列表

我正在尝试列出 dataproc 集群以获取工作节点名称。代码返回的数据类型是,我想将其转换为列表

for cluster in dataproc_cluster_client.list_clusters(project_id, region):
    if cluster.cluster_name == 'test':
        print(type(cluster.config.worker_config.instance_names))
        print(type(cluster.config.master_config.instance_names))
Run Code Online (Sandbox Code Playgroud)

python google-cloud-platform

11
推荐指数
1
解决办法
8840
查看次数

标签 统计

google-cloud-platform ×1

python ×1