From c59397a8d2f1512dc02e163e4ca615cd11a80f81 Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Wed, 18 Jun 2025 12:30:47 -0700 Subject: [PATCH] Exit with exception if _nudge_pos() fails with a ValueError. --- .vscode/launch.json | 3 ++- src/data/calibrate.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a61ba927..d31cbfba 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -235,7 +235,7 @@ //"args": ["-v", "1", "--mission", "2007.344.00", "--use_portal", "--clobber", "--noinput"] //"args": ["-v", "1", "--mission", "2009.055.05", "--clobber", "--noinput"] //"args": ["-v", "1", "--mission", "2010.172.01", "--local", "--clobber", "--noinput"] - "args": ["-v", "1", "--start_year", "2010", "--end_year", "2010", "--start_yd", "81", "--end_yd", "84", "--no_cleanup", "--num_cores", "1", "--noinput"] + //"args": ["-v", "1", "--start_year", "2010", "--end_year", "2010", "--start_yd", "81", "--end_yd", "84", "--no_cleanup", "--num_cores", "1", "--noinput"] //"args": ["-v", "1", "--mission", "2010.286.02", "--clobber", "--noinput"] //"args": ["-v", "1", "--start_year", "2010", "--end_year", "2010", "--start_yd", "286", "--local", "--clobber", "--noinput"] //"args": ["-v", "1", "--start_year", "2004", "--end_year", "2004", "--start_yd", "167", "--clobber", "--noinput"] @@ -269,6 +269,7 @@ //"args": ["-v", "1", "--noinput", "--no_cleanup", "--mission", "2010.341.00", "--download_process", "--local"] //"args": ["-v", "1", "--noinput", "--no_cleanup", "--mission", "2020.337.00", "--clobber"] //"args": ["-v", "1", "--noinput", "--no_cleanup", "--mission", "2008.010.10"] + "args": ["-v", "2", "--mission", "2004.029.03", "--noinput", "--no_cleanup"], }, { diff --git a/src/data/calibrate.py b/src/data/calibrate.py index 8fe2e608..a5c113cb 100755 --- a/src/data/calibrate.py +++ b/src/data/calibrate.py @@ -3524,8 +3524,8 @@ def process_logs(self, vehicle: str = "", name: str = "", process_gps: bool = Tr self.logger.error("Error processing %s: %s", sensor, e) # noqa: TRY400 else: self.logger.debug("Error processing %s: %s", sensor, e) - # except ValueError as e: - # self.logger.error(f"Error processing {sensor}: {e}") + except ValueError: + self.logger.exception("Error processing %s", sensor) except KeyError as e: self.logger.error("Error processing %s: missing variable %s", sensor, e) # noqa: TRY400