I am using geopy to geocode some addresses and I want to catch the timeout errors and print them out so I can do some quality control on the input. I am putting the geocode
I dealt with the Same Problem for so many days this is my code:
geolocator = Nominatim(user_agent="ny_explorer") location = geolocator.geocode(address_venue)
ERROR Service timed out
solution: Add a new attribute that declares the timeout:
location = geolocator.geocode(address_venue,timeout=10000)