From 0579b3b860035bf4db609894b955a0daad7efd28 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Mon, 15 Sep 2025 15:26:11 -0400 Subject: [PATCH] more of the day debug logging and fix datetime duplicate in NCAA FB --- src/ncaa_fb_managers.py | 1 - src/of_the_day_manager.py | 24 +++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/ncaa_fb_managers.py b/src/ncaa_fb_managers.py index 435a19a4..8bccb0ae 100644 --- a/src/ncaa_fb_managers.py +++ b/src/ncaa_fb_managers.py @@ -267,7 +267,6 @@ class BaseNCAAFBManager: # Renamed class # CRITICAL FIX: Also fetch current week using date-based approach (like odds manager) # This ensures we get games that might be missed by week-based API try: - from datetime import datetime, timedelta now = datetime.now(pytz.utc) # Fetch games from yesterday to next 7 days (same as odds manager) for days_offset in range(-1, 8): # Yesterday through next 7 days diff --git a/src/of_the_day_manager.py b/src/of_the_day_manager.py index a33f6feb..8f77503c 100644 --- a/src/of_the_day_manager.py +++ b/src/of_the_day_manager.py @@ -190,17 +190,23 @@ class OfTheDayManager: os.path.join(script_dir, '..', 'of_the_day', data_file), os.path.join('of_the_day', data_file) ]) - - # Remove duplicates while preserving order - seen = set() - unique_paths = [] - for path in possible_paths: - abs_path = os.path.abspath(path) - if abs_path not in seen: - seen.add(abs_path) - unique_paths.append(abs_path) + + # Debug: Show all paths before deduplication + logger.debug(f"All possible paths before deduplication: {possible_paths}") + + # Remove duplicates while preserving order + seen = set() + unique_paths = [] + for path in possible_paths: + abs_path = os.path.abspath(path) + if abs_path not in seen: + seen.add(abs_path) + unique_paths.append(abs_path) possible_paths = unique_paths + # Debug: Show paths after deduplication + logger.debug(f"Unique paths after deduplication: {possible_paths}") + file_path = None for potential_path in possible_paths: abs_path = os.path.abspath(potential_path)