Update web_server.py

This commit is contained in:
Cassianvale
2025-03-04 12:08:19 +08:00
parent 476568f328
commit 5ccab7ab43

View File

@@ -29,8 +29,8 @@ def analyze():
result = analyzer.analyze_stock(stock_code.strip(), market_type) result = analyzer.analyze_stock(stock_code.strip(), market_type)
results.append(result) results.append(result)
except Exception as e: except Exception as e:
app.logger.error(f"分析股票 {stock_code} 失败: {str(e)}") print(f"分析股票 {stock_code} 失败: {str(e)}")
app.logger.error(f"详细错误: {traceback.format_exc()}") print(f"详细错误: {traceback.format_exc()}")
results.append({ results.append({
'code': stock_code, 'code': stock_code,
'error': f"分析失败: {str(e)}" 'error': f"分析失败: {str(e)}"