increase Nominatim timeout
Browse files
climateqa/engine/talk_to_data/input_processing.py
CHANGED
|
@@ -46,7 +46,7 @@ def loc_to_coords(location: str) -> tuple[float, float]:
|
|
| 46 |
Raises:
|
| 47 |
AttributeError: If the location cannot be found
|
| 48 |
"""
|
| 49 |
-
geolocator = Nominatim(user_agent="city_to_latlong")
|
| 50 |
coords = geolocator.geocode(location)
|
| 51 |
return (coords.latitude, coords.longitude)
|
| 52 |
|
|
|
|
| 46 |
Raises:
|
| 47 |
AttributeError: If the location cannot be found
|
| 48 |
"""
|
| 49 |
+
geolocator = Nominatim(user_agent="city_to_latlong", timeout=5)
|
| 50 |
coords = geolocator.geocode(location)
|
| 51 |
return (coords.latitude, coords.longitude)
|
| 52 |
|