Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.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
Google api 谷歌云存储可以';找不到项目名称_Google Api_Google Cloud Storage_Google Python Api - Fatal编程技术网

Google api 谷歌云存储可以';找不到项目名称

Google api 谷歌云存储可以';找不到项目名称,google-api,google-cloud-storage,google-python-api,Google Api,Google Cloud Storage,Google Python Api,我正在使用Google Storage API的python客户端库,我有一个文件pythonScript.py,它包含以下内容: # Imports the Google Cloud client library from google.cloud import storage # Instantiates a client storage_client = storage.Client() # The name for the new bucket bucket_name = 'my-n

我正在使用Google Storage API的python客户端库,我有一个文件pythonScript.py,它包含以下内容:

# Imports the Google Cloud client library
from google.cloud import storage

# Instantiates a client
storage_client = storage.Client()

# The name for the new bucket
bucket_name = 'my-new-bucket'

# Creates the new bucket
bucket = storage_client.create_bucket(bucket_name)

print('Bucket {} created.'.format(bucket.name))
当我尝试运行它时,我在终端中得到:

回溯(最近一次调用上次):文件 “pythonScript.py”,第11行,在 bucket=storage\u client.create\u bucket(bucket\u name)文件“/home/joel/MATI/env/lib/python3.5/site packages/google/cloud/storage/client.py”, 第218行,在创建_桶中 创建(client=self)文件“/home/joel/MATI/env/lib/python3.5/site packages/google/cloud/storage/bucket.py”, 创建中的第199行 data=properties,_target\u object=self)文件“/home/joel/MATI/env/lib/python3.5/site packages/google/cloud/_http.py”, 第293行,在api_请求中 引发异常。来自_http_response(response)google.cloud.exceptions.Conflict:409 POST : 对不起,该名称不可用。请换一个

我不知道为什么,因为我确实为我的项目启用了GSSAPI,并且默认配置似乎是正确的。
gcloud config list
的输出为:

[计算]

地区=美国东部1

区域=美国东部1-d

[核心] 帐户=joel@southbendcodeschool.com

禁用使用情况报告=真

项目=avid-folder-180918

您的活动配置为:[默认值]


Bucket名称是全局唯一的。其他人必须已经拥有名为“我的新bucket”的bucket。

bucket名称是全局唯一的。其他人必须已经拥有名为“我的新bucket”的bucket。

GCS有一个全局bucket名称空间(在所有GCS用户之间共享),并且该bucket名称(“我的新bucket”)已经存在。您需要选择一个不同的名称。GCS有一个bucket的全局命名空间(在所有GCS用户之间共享),并且该bucket名称(“我的新bucket”)已经存在。你需要选择一个不同的名字。