From e63f4816c4aed9acbef49384ba89a7839bfb7a45 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Fri, 15 Nov 2024 14:16:35 -0800 Subject: [PATCH] Update locationdata.py --- modules/locationdata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/locationdata.py b/modules/locationdata.py index 21b6f61..c22aae8 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -196,7 +196,10 @@ def get_tide(lat=0, lon=0): # extract table class="table table-condensed" soup = bs.BeautifulSoup(station_data.text, 'html.parser') table = soup.find('table', class_='table table-condensed') - + if table is None: + logger.error("Location:error parsing tide data from NOAA") + return ERROR_FETCHING_DATA + # extract rows rows = table.find_all('tr') # extract data from rows