From f75cceefd44e346611cfbefc58f68390fb3d7ac0 Mon Sep 17 00:00:00 2001 From: Nolan Kovacs Date: Sat, 4 Apr 2026 13:06:21 -0400 Subject: [PATCH] Fixes --- dist/stock_screener.py | 7 +++++++ launcher.py | 3 +++ updater.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dist/stock_screener.py b/dist/stock_screener.py index 35b2519..a97d68a 100644 --- a/dist/stock_screener.py +++ b/dist/stock_screener.py @@ -996,6 +996,13 @@ def _fetch_edgar_bulk(close_map: dict[str, pd.Series]) -> dict[str, dict]: # Analyst + Fundamentals Cache (Verimund API) # --------------------------------------------------------------------------- +if not getattr(sys, "frozen", False): + import os as _os + _root = _os.path.dirname(_os.path.dirname(_os.path.abspath(__file__))) + if _root not in sys.path: + sys.path.insert(0, _root) + del _os + try: from license_check import _API_URL as _API_URL, get_api_headers as _get_api_headers except ImportError: diff --git a/launcher.py b/launcher.py index f9372ae..9966273 100644 --- a/launcher.py +++ b/launcher.py @@ -14,6 +14,9 @@ import sys import tkinter as tk from tkinter import messagebox +# Add dist/ to path so screener_gui and stock_screener are importable +sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "dist")) + # Fix SSL certificate path for PyInstaller frozen builds. # Without this, requests raises "Could not find a suitable TLS CA certificate bundle". if getattr(sys, "frozen", False): diff --git a/updater.py b/updater.py index ed83884..d9f0073 100644 --- a/updater.py +++ b/updater.py @@ -19,7 +19,7 @@ import requests # --------------------------------------------------------------------------- # Current app version — kept in sync by push_update.py before each build. # --------------------------------------------------------------------------- -APP_VERSION = "1.4.1" +APP_VERSION = "1.4.2" def _exe_dir() -> str: