From 2f704fbe4f0bdc322e64eb74e36b7e6d54999bd3 Mon Sep 17 00:00:00 2001 From: KoaCWells Date: Thu, 16 Mar 2023 16:17:18 -0400 Subject: [PATCH] Modify logger to ignore trimesh warnings and update geometry helper to stop call to NRCAN website --- hub/helpers/geometry_helper.py | 1 + hub/hub_logger/__init__.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hub/helpers/geometry_helper.py b/hub/helpers/geometry_helper.py index d46eb71b..fe8a0d05 100644 --- a/hub/helpers/geometry_helper.py +++ b/hub/helpers/geometry_helper.py @@ -240,6 +240,7 @@ class GeometryHelper: """ Get Location from latitude and longitude """ + return Location('ca', 'montreal') url = 'https://nominatim.openstreetmap.org/reverse?lat={latitude}&lon={longitude}&format=json' response = requests.get(url.format(latitude=latitude, longitude=longitude)) if response.status_code != 200: diff --git a/hub/hub_logger/__init__.py b/hub/hub_logger/__init__.py index 87629fef..8c55844b 100644 --- a/hub/hub_logger/__init__.py +++ b/hub/hub_logger/__init__.py @@ -2,6 +2,9 @@ import logging as logger from pathlib import Path import os +log = logger.getLogger("trimesh") +log.setLevel(logger.ERROR) + log_dir = (Path(__file__).parent.parent / 'logs').resolve() log_file = (log_dir / 'hub.log').resolve() try: