From 99e1e22fa6131a5524c084586204dc35b310177d Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 25 Jun 2024 20:54:20 -0700 Subject: [PATCH] Update locationdata.py --- locationdata.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locationdata.py b/locationdata.py index 906e900..5d40715 100644 --- a/locationdata.py +++ b/locationdata.py @@ -15,14 +15,14 @@ def where_am_i(lat=0, lon=0): return "no location data: does your device have GPS?" # initialize Nominatim API geolocator = Nominatim(user_agent="mesh-bot") - - location = geolocator.reverse(lat+","+lon) + + location = geolocator.reverse(lat + ", " + lon) address = location.raw['address'] address_components = ['house_number', 'road', 'city', 'state', 'postcode', 'county', 'country'] whereIam += ' '.join([address.get(component, '') for component in address_components if component in address]) grid = mh.to_maiden(float(lat), float(lon)) - whereIam += " Grid:" + grid - + whereIam += " Grid: " + grid + return whereIam def get_tide(lat=0, lon=0):