"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
fix(ashare-mootdx): replace bare except with except Exception
shadowinlifeb1c6fcec2376
diff --git a/agent/skills/ashare-mootdx/references/a_mootdx_fetcher.py b/agent/skills/ashare-mootdx/references/a_mootdx_fetcher.pyindex 39633cf88..f429b5d80 100644--- a/agent/skills/ashare-mootdx/references/a_mootdx_fetcher.py+++ b/agent/skills/ashare-mootdx/references/a_mootdx_fetcher.py@@ -5,10 +5,13 @@ Free, no API key, no IP rate limits.Usage:from a_mootdx_fetcher import fetch_daily, fetch_realtime, batch_fetch_daily"""+import loggingfrom mootdx.quotes import Quotesimport pandas as pdfrom typing import Optional, List+logger = logging.getLogger(__name__)+FREQ_MAP = {'5min':0,'15min':1,'30min':2,'60min':3,'daily':9,'weekly':5,'monthly':6,'1min':8}def _get_client():@@ -68,7 +71,9 @@ def batch_fetch_daily(codes, limit=250, sleep_sec=0.3):try:df = fetch_daily(code, limit=limit)if len(df) > 0: results[code] = df- except: results[code] = pd.DataFrame()+ except Exception as e:+ logger.warning("Failed to fetch daily bars for %s: %s", code, e)+ results[code] = pd.DataFrame()if i < len(codes) - 1: time.sleep(sleep_sec)return results