From cbf2fa18a2fe3e36b81f05302db7b0bf0c853109 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Thu, 15 Feb 2024 21:47:28 +0100 Subject: [PATCH] Fixed datetime not serualizable --- src/statistics/debug_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statistics/debug_logging.py b/src/statistics/debug_logging.py index 91ebd2f..83660f3 100644 --- a/src/statistics/debug_logging.py +++ b/src/statistics/debug_logging.py @@ -3,7 +3,7 @@ import logging import json def _debug_log_change(countChange: int, directionState: dict) -> None: - json_state = json.dumps(directionState) + json_state = json.dumps(directionState, default=str) logging.debug(f"CHANGE;Count Change;{str(countChange)};Direction State;{json_state};") def _debug_log_trigger(triggerState: dict) -> None: