Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import numpy as np
|
|
| 4 |
import tempfile
|
| 5 |
import plotly.graph_objects as go
|
| 6 |
import plotly.express as px
|
|
|
|
| 7 |
from plotly.subplots import make_subplots
|
| 8 |
import requests
|
| 9 |
from datetime import datetime, timedelta
|
|
@@ -47,6 +48,10 @@ class EnhancedOceanClimateAgent:
|
|
| 47 |
try:
|
| 48 |
print(f"π‘ Requesting {product} data for station {station_id}")
|
| 49 |
print("π Date range:", start_date.strftime('%Y-%m-%d'), "to", end_date.strftime('%Y-%m-%d'))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
response = requests.get(self.noaa_base_url, params=params, timeout=30)
|
| 52 |
print(f"π Status code: {response.status_code}")
|
|
|
|
| 4 |
import tempfile
|
| 5 |
import plotly.graph_objects as go
|
| 6 |
import plotly.express as px
|
| 7 |
+
from urllib.parse import urlencode
|
| 8 |
from plotly.subplots import make_subplots
|
| 9 |
import requests
|
| 10 |
from datetime import datetime, timedelta
|
|
|
|
| 48 |
try:
|
| 49 |
print(f"π‘ Requesting {product} data for station {station_id}")
|
| 50 |
print("π Date range:", start_date.strftime('%Y-%m-%d'), "to", end_date.strftime('%Y-%m-%d'))
|
| 51 |
+
|
| 52 |
+
# Print full API URL for testing
|
| 53 |
+
full_url = f"{self.noaa_base_url}?{urlencode(params)}"
|
| 54 |
+
print(f"π NOAA API URL: {full_url}")
|
| 55 |
|
| 56 |
response = requests.get(self.noaa_base_url, params=params, timeout=30)
|
| 57 |
print(f"π Status code: {response.status_code}")
|