使用google civic API的HttpError

2024-05-16 20:26:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用representativeInfoByAddres从googlecivicapihttps://developers.google.com/civic-information/docs/v2/representatives/representativeInfoByAddress请求一些数据,但是当我试图调用execute()时,我得到了一个错误。在

from apiclient.discovery import build
add = "24783 Oakwood Circle Anaheim CA 92801"
service = build('civicinfo','v2', developerKey="key")               
rep = service.representatives().representativeInfoByAddress(address = add)
response = rep.execute()

退货

^{pr2}$

我做错什么了?在


Tags: buildcomaddexecuteinformationservicegooglev2