下面的python脚本已经作为云函数运行在GCP上,服务器us-central1 1最近开始抛出UnknownApiNameOrVersion错误。日志显示源自下面提到的站长构建功能的错误。
from googleapiclient.discovery import build
import requests
from datetime import datetime
import json
import pandas as pd
from google.cloud import bigquery
from google.cloud import secretmanager
import json
client = secretmanager.SecretManagerServiceClient()
secret = client.access_secret_version('...')
secret = json.loads(secret.payload.data.decode('UTF-8'))
credentials = service_account.Credentials.from_service_account_info(secret, scopes=SCOPES)
webmaster = build(
'webmasters',
'v3',
credentials=credentials
)
发布于 2022-01-27 00:55:30
https://stackoverflow.com/questions/70198457
复制