fix: 3 bugs from system logs — timedelta, scoring IndexError, lxml
- database.py: add timedelta to datetime import (used in get_recent_economic_surprises, was raising NameError) - ai_analyzer.py: scoring split was searching French string 'Retourne UNIQUEMENT ce JSON valide:' but prompt is now in English 'Return ONLY this valid JSON:' — caused IndexError crashing every cycle - requirements.txt: add lxml>=5.0.0 (yfinance earnings_dates dependency, was silently failing all 23 ticker fetches every hour) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ SQLite persistence layer for portfolio positions, custom patterns, and config.
|
||||
import sqlite3
|
||||
import json
|
||||
import os
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List, Dict, Any, Optional
|
||||
|
||||
DB_PATH = os.path.join(os.path.dirname(__file__), "..", "data", "geooptions.db")
|
||||
|
||||
Reference in New Issue
Block a user