From d8fc7975d05912d0e8fa2500044f10d2dd51a3b6 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 19 Jun 2024 22:26:34 -0700 Subject: [PATCH] Update locationdata.py --- locationdata.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/locationdata.py b/locationdata.py index 7eab290..315660d 100644 --- a/locationdata.py +++ b/locationdata.py @@ -33,6 +33,9 @@ def where_am_i(lat=0, lon=0): return whereIam def get_tide(lat=0, lon=0): + station_id = "" + if lat == 0 and lon == 0: + return "no location data" station_lookup_url = "https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/tidepredstations.json?lat=" + str(lat) + "&lon=" + str(lon) + "&radius=50" station_data = requests.get(station_lookup_url, timeout=5) if(station_data.ok):