diff --git a/technical_analysis.py b/technical_analysis.py index 5a6ddcae..7465d678 100644 --- a/technical_analysis.py +++ b/technical_analysis.py @@ -472,7 +472,9 @@ def analyze_volume_deep(code): import sqlite3 from pathlib import Path - DATA_DIR = Path(__file__).parent.parent / "data" + DATA_DIR = Path(__file__).parent / "scripts" / "data" + if not (DATA_DIR / "mofin.db").exists(): + DATA_DIR = Path(__file__).parent / "data" try: conn = sqlite3.connect(str(DATA_DIR / "mofin.db")) row = conn.execute("SELECT cache_json FROM mtf_cache WHERE code=?", (code,)).fetchone()