【发布时间】:2016-11-10 15:53:46
【问题描述】:
我尝试执行这段代码:
from geopy.geocoders import GoogleV3
point = '51.523910, -0.158578'
geolocator = GoogleV3()
address = geolocator.reverse(point)
我收到此错误:
error: [Errno 104] Connection reset by peer
我在 vagrant 机器上执行这个,但是当我在本地机器上执行它时它可以工作!!!
【问题讨论】:
-
我明白了。你能从你的流浪机器连接到互联网吗?似乎没有可用的连接。
-
是的,我可以连接和 ping google.com。如果我尝试使用 api 的 url 卷曲,它也可以工作。
-
你需要配置你的虚拟机网络。检查你的 80 端口是否打开
标签: python google-geocoder geopy