Update tradingagents/graph/portfolio_analysis.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
robinsxe 2026-03-24 20:18:14 +01:00 committed by GitHub
parent ae2c813d8a
commit 03d7752d46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -88,11 +88,12 @@ class PortfolioAnalyzer:
"final_trade_decision": final_state["final_trade_decision"],
}
except Exception as e:
import traceback
if debug:
print(f"Error analyzing {ticker}: {e}")
individual_results[ticker] = {
"signal": "ERROR",
"final_trade_decision": f"Analysis failed: {e}",
"final_trade_decision": f"Analysis failed: {e}\n{traceback.format_exc()}",
}
return individual_results