Search code examples
pythongoogle-geocodergeopy

geocoder connection reset by peer


I tried to execute this code:

from geopy.geocoders import GoogleV3
point = '51.523910, -0.158578'
geolocator = GoogleV3()
address = geolocator.reverse(point)

I get this error:

error: [Errno 104] Connection reset by peer

I am executing this inside a vagrant machine but when I execute this on my local machine it works !!!


Solution

  • This is a recent issue of VirtualBox(which is the most probable provider of your vagrant) setting incorrect checksums when networking is set to work as NAT. Possible decisions are:

    • use bridge networking instead of NAT
    • update your VirtualBox to a recent test build (5.1.9 helped in my case)

    You can read more at VirtalBox issues on their tracker here and here