服务在Geopy中使用地理编码器API超时

时间:2014-05-12 01:09:02

标签: python-2.7 geopy

我在网上找到了这个代码,但它对我不起作用:

from geopy import geocoders

    g = geocoders.GeoNames(username="myusersname")
    (place, point) = g.geocode("Palo Alto, CA 94306")
    print place

    print point


    (new_place,new_point) = g.reverse(point)
    print new_place

    print new_point

出错:

   raise GeocoderTimedOut('Service timed out')
geopy.exc.GeocoderTimedOut: Service timed out

0 个答案:

没有答案