From fe89f2bab432c4dd049119632c758134fc4fac51 Mon Sep 17 00:00:00 2001 From: bikegeek <3753118+bikegeek@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:54:28 -0600 Subject: [PATCH] Feature 404 v3.0.0 beta6 (#407) * Per #404, modifying version and dates * Per #404, updating release notes * Adding self as an argument to calculate_statistic to attempt to resolve error with METplotpy run * Removing self as an argument to calculate_statistic to attempt to resolve error with METplotpy run because this would need to be done in the develop branch * calculate_statistic() is not a SumStat class method. Remove the logging, which requires the logger that is created in the constructor of the SumStat class. Instead, raise an exception with a detailed message. * Logging message is referencing an error alias that doesn't exist. --------- Co-authored-by: Julie Prestopnik --- metcalcpy/util/ctc_statistics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metcalcpy/util/ctc_statistics.py b/metcalcpy/util/ctc_statistics.py index da289b1e..5d2fb317 100644 --- a/metcalcpy/util/ctc_statistics.py +++ b/metcalcpy/util/ctc_statistics.py @@ -218,7 +218,7 @@ def calculate_pofd(input_data, columns_names, logger=None): result = fy_on / oy result = round_half_up(result, PRECISION) safe_log(logger, "info", f"POFD calculation successful: {result}") - except (TypeError, ZeroDivisionError, Warning, ValueError): + except (TypeError, ZeroDivisionError, Warning, ValueError) as e: safe_log(logger, "error", f"Error in POFD calculation: {e}") result = None warnings.filterwarnings('ignore')