From the error you provided, it looks like a timeout issue. Try setting the timeout parameter when initializing the geolocator like this-
geolocator = geopy.Nominatim(user_agent='my-geocoding-app/1.0', timeout=10)