paolosca90 Claude commited on
Commit
ae8f441
·
1 Parent(s): 652e514

debug: Add comprehensive logging to track symbol routing

Browse files

Adding detailed debug logs to trace:
- Symbol routing decisions
- API approach selection
- Data retrieval process
- Success/failure conditions

This will help identify exactly where the process fails on Hugging Face

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -126,6 +126,8 @@ timesfm_predictor = TimesFMPredictor()
126
  def get_market_data_with_retry(symbol: str, max_retries: int = 3) -> pd.DataFrame:
127
  """Get market data with independent OANDA direct integration - No external dependencies"""
128
 
 
 
129
  # Major forex pairs with high liquidity - OANDA format (for dropdown)
130
  major_forex_oanda = {
131
  'EURUSD', 'GBPUSD', 'USDJPY', 'USDCHF',
@@ -155,6 +157,7 @@ def get_market_data_with_retry(symbol: str, max_retries: int = 3) -> pd.DataFram
155
  symbol_lower = symbol.lower()
156
 
157
  if symbol in major_forex_oanda or symbol in minor_forex_oanda or symbol in forex_metals_oanda:
 
158
  # Major forex/metals - OANDA direct API (independent from Supabase)
159
  approaches = [
160
  ("OANDA Direct API", lambda s: get_oanda_data(s)),
 
126
  def get_market_data_with_retry(symbol: str, max_retries: int = 3) -> pd.DataFrame:
127
  """Get market data with independent OANDA direct integration - No external dependencies"""
128
 
129
+ print(f"🚀 get_market_data_with_retry called with symbol: '{symbol}'")
130
+
131
  # Major forex pairs with high liquidity - OANDA format (for dropdown)
132
  major_forex_oanda = {
133
  'EURUSD', 'GBPUSD', 'USDJPY', 'USDCHF',
 
157
  symbol_lower = symbol.lower()
158
 
159
  if symbol in major_forex_oanda or symbol in minor_forex_oanda or symbol in forex_metals_oanda:
160
+ print(f"✅ Symbol '{symbol}' matches OANDA format sets")
161
  # Major forex/metals - OANDA direct API (independent from Supabase)
162
  approaches = [
163
  ("OANDA Direct API", lambda s: get_oanda_data(s)),