Python 无法连接到主机存储。googleapis.com:443 ssl:default[没有到主机的路由]

Python 无法连接到主机存储。googleapis.com:443 ssl:default[没有到主机的路由],python,google-cloud-storage,Python,Google Cloud Storage,试图从google云存储读取csv,但出现连接错误: import pandas as pd from google.oauth2 import service_account key_path = 'path_to_creds.json' credentials = service_account.Credentials.from_service_account_file( key_path, scopes=["https://www.googleapis.com/auth

试图从google云存储读取csv,但出现连接错误:

import pandas as pd
from google.oauth2 import service_account

key_path = 'path_to_creds.json'
credentials = service_account.Credentials.from_service_account_file(
    key_path, scopes=["https://www.googleapis.com/auth/cloud-platform"])


print('reading csv ...')
# Getting DF
df = pd.read_csv('gs://bucket_name/data_set_name/csv_name.csv',
                               storage_options={"token":key_path}, index_col=0)
但是我得到了以下错误。(它会打印“读取csv…”)

我没有防火墙,使用macOS Big Sur 11.2.3和python 3.9


你知道为什么会发生这种情况吗?

很高兴提到同样的代码对同事有效,但对我无效:你能成功地ping storage.googleapis.com吗?是的!当
ping android.googleapis.com
时,我得到了回复。有什么想法吗@RiccoDi的意思是ping storage.googleapis.com(:
ClientConnectorError: Cannot connect to host storage.googleapis.com:443 ssl:default [No route to host]