Spaces:
Sleeping
Sleeping
Update app.py
Browse filesfixed exception-error
app.py
CHANGED
|
@@ -41,6 +41,8 @@ def get_current_temperatur_on_location(location: str, day: str)-> str: #it's imp
|
|
| 41 |
# Get monthly data for period
|
| 42 |
data = Monthly(tpr, start, end)
|
| 43 |
data = data.fetch()
|
|
|
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
|
|
|
|
| 41 |
# Get monthly data for period
|
| 42 |
data = Monthly(tpr, start, end)
|
| 43 |
data = data.fetch()
|
| 44 |
+
except Exception as e:
|
| 45 |
+
return f"Error fetching temperatur for location '{location}': {str(e)}"
|
| 46 |
|
| 47 |
|
| 48 |
|