Modify logger to ignore trimesh warnings and update geometry helper to stop call to NRCAN website

This commit is contained in:
KoaCWells 2023-03-16 16:17:18 -04:00
parent 63b91c4d67
commit 2f704fbe4f
2 changed files with 4 additions and 0 deletions

View File

@ -240,6 +240,7 @@ class GeometryHelper:
""" """
Get Location from latitude and longitude Get Location from latitude and longitude
""" """
return Location('ca', 'montreal')
url = 'https://nominatim.openstreetmap.org/reverse?lat={latitude}&lon={longitude}&format=json' url = 'https://nominatim.openstreetmap.org/reverse?lat={latitude}&lon={longitude}&format=json'
response = requests.get(url.format(latitude=latitude, longitude=longitude)) response = requests.get(url.format(latitude=latitude, longitude=longitude))
if response.status_code != 200: if response.status_code != 200:

View File

@ -2,6 +2,9 @@ import logging as logger
from pathlib import Path from pathlib import Path
import os import os
log = logger.getLogger("trimesh")
log.setLevel(logger.ERROR)
log_dir = (Path(__file__).parent.parent / 'logs').resolve() log_dir = (Path(__file__).parent.parent / 'logs').resolve()
log_file = (log_dir / 'hub.log').resolve() log_file = (log_dir / 'hub.log').resolve()
try: try: