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 无法从GCE调用discovery.build(';compute';,';v1';,凭据=凭据)_Python_Google Cloud Platform_Google Compute Engine_Google Api Python Client - Fatal编程技术网

Python 无法从GCE调用discovery.build(';compute';,';v1';,凭据=凭据)

Python 无法从GCE调用discovery.build(';compute';,';v1';,凭据=凭据),python,google-cloud-platform,google-compute-engine,google-api-python-client,Python,Google Cloud Platform,Google Compute Engine,Google Api Python Client,运行build命令时,它将超时 from googleapiclient import discovery from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_default() service = discovery.build('compute', 'v1', credentials=credentials) 我只在正确设置env的情况下在计算引

运行build命令时,它将超时

from googleapiclient import discovery
from oauth2client.client import GoogleCredentials

credentials = GoogleCredentials.get_application_default()
service = discovery.build('compute', 'v1', credentials=credentials)
我只在正确设置env的情况下在计算引擎上运行这个。这在早些时候起作用。 我能够运行
service=discovery.build('storage','v1',credentials=credentials)
我现在犯了一个错误

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py", line 250, in build
    developerKey, num_retries=num_retries
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py", line 316, in _retrieve_discovery_doc
    resp, content = req.execute(num_retries=num_retries)
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 901, in execute
    headers=self.headers,
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 204, in _retry_request
    raise exception
ssl.SSLError: ('The read operation timed out',)

回溯(最近一次呼叫最后一次):
文件“”,第1行,在
位置包装中的文件“/usr/local/lib/python2.7/dist packages/googleapiclient/_helpers.py”,第134行
已包装退货(*args,**kwargs)
文件“/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py”,第250行,内部版本
developerKey,num\u retries=num\u retries
文件“/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py”,第316行,位于“检索发现”文档中
resp,content=req.execute(num\u retries=num\u retries)
位置包装中的文件“/usr/local/lib/python2.7/dist packages/googleapiclient/_helpers.py”,第134行
已包装退货(*args,**kwargs)
文件“/usr/local/lib/python2.7/dist packages/googleapiclient/http.py”,第901行,在execute中
headers=self.headers,
文件“/usr/local/lib/python2.7/dist packages/googleapiclient/http.py”,第204行,在重试请求中
引发异常
ssl.SSLError:(“读取操作超时”,)
计算引擎API是否存在一些问题?
任何线索都会有帮助。

这是一个已知的临时问题。从

谷歌的API发现服务GetRest()请求挂起在以下区域:亚洲东北1、亚洲东北2、亚洲东北3、亚洲东南1、欧洲西1、欧洲西3、欧洲西6、欧洲西4、北美东北1、南美东1、美国中部1、美国东1、美国西1、美国西2和美国西4

我们目前正在努力通过回滚配置更改来缓解此问题。下一次更新时间为美国/太平洋地区2020-10-08 07:00星期四


它也是用来计算的吗?我看到pubsub链接我是如何从cloudfunction(即us-west2)中点击它的?“us-west1,us-west2,和”: