【发布时间】:2021-08-06 20:52:24
【问题描述】:
我在 Docker 中运行一个应用程序,需要我利用 google-bigquery。当我在 Docker 之外运行它时,我只需要转到下面的链接(已编辑)并授权。但是,当我从 Docker 终端复制粘贴它时,该链接不起作用。我也尝试过端口映射,也没有运气。
代码:
credentials = service_account.Credentials.from_service_account_file(
key_path, scopes=["https://www.googleapis.com/auth/cloud-platform"],
)
# Make clients.
client = bigquery.Client(credentials=credentials, project=credentials.project_id,)
回复:requests_oauthlib.oauth2_session - DEBUG - Generated new statePlease visit this URL to authorize this application:
【问题讨论】:
标签: docker google-bigquery google-api