谷歌地图api http

2024-04-29 21:21:10 发布

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

我正在尝试学习使用windows powershell在python上运行googlemapsapi

导入语句

import googlemaps
from googlemaps import Client

mapService = Client(you_key,your_client_id,your_client_secret)
directions = mapService.directions('Texarkana','Atlanta')

for step in directions['Directions']['Routes'][0]['Steps']:
        print (step['descriptionHtml'])

这是我正在使用的代码,我有来自google开发者控制台的api密钥、客户端id和密码

我得到了错误

googlemaps.exceptions.HTTPError:HTTPError:403

这不是403禁止的错误,也不是我能发现的。 好心人来帮我。谢谢


Tags: fromimportclientidyourwindowsstep错误