geopy.exc.GeocoderInsufficientPrivileges: HTTP Error 403: Forbidden

在安装geopy时,出现标题中的错误

import json, logging
from geopy.geocoders import Nominatim

geolocator = Nominatim(user_agent="specify_your_app_name_here")
location = geolocator.geocode("175 5th Avenue NYC")

解决方案:

geolocator = Nominatim(user_agent="name_of_your_app")

猜你喜欢

转载自blog.csdn.net/qq_36321330/article/details/109452454