Significant-Gravitas/AutoGPT · error · HTTPException
str(e)
Error message
str(e)
What it means
HTTP 500 from the admin execution-analytics generation endpoint. An unexpected exception escaped the generation loop (per-execution failures are counted as failed_count, so this indicates something systemic — DB fetch of executions, request assembly, or the final response build) and str(e) is returned as the detail. The full traceback is in the server log via logger.exception.
Solutions
- Read the server traceback (the response detail is only str(e)) to identify the throwing frame.
- If legacy stats are involved, exclude old executions via the request's date/id filters and retry.
- Fix or migrate the malformed data the traceback points to.
- Re-run the request on a narrower execution set to isolate the offending record.
Defensive patterns
Strategy: try-catch
Try / catch
try { const r = await generateExecutionAnalytics(req); } catch (e) { if (e.status === 500) { logServerError(e.detail); await retryWithNarrowerScope(req); /* fewer executions per batch */ } } Prevention
- Narrow the execution set (date filters, graph ids) on first runs to isolate bad records.
- Regenerate analytics after schema migrations so rows match the current shapes.
- Always pair client 500 handling with a server-log check — the detail alone lacks the stack.
When it happens
Trigger: POST /admin/execution-analytics where a non-per-execution step throws: e.g. get_graph_executions failing on malformed stats JSON, a Pydantic validation error building ExecutionAnalyticsResponse, or serialization of unanticipated stats shapes.
Common situations: First analytics run against legacy executions whose stats predate the current schema; a model rename breaking GraphExecutionMeta.Stats conversion; DB connectivity blips mid-generation.
Related errors
- OpenAI API key not configured
- str(exc)
- Community rebuild scheduling failed
- Dream pass scheduling failed
- Execution not found
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/ebcb269744338dcf.
Report an issue: GitHub.
Appendix: source
Thrown at autogpt_platform/backend/backend/api/features/admin/execution_analytics_routes.py:345
response = ExecutionAnalyticsResponse(
total_executions=len(executions),
processed_executions=len(executions_to_process),
successful_analytics=successful_count,
failed_analytics=failed_count,
skipped_executions=len(executions) - len(executions_to_process),
results=results,
)
logger.info(
f"Analytics generation completed: {successful_count} successful, {failed_count} failed, "
f"{response.skipped_executions} skipped"
)
return response
except Exception as e:
logger.exception(f"Error during execution analytics generation: {e}")
raise HTTPException(status_code=500, detail=str(e))
async def _process_batch(
executions, request: ExecutionAnalyticsRequest, db_client
) -> list[ExecutionAnalyticsResult]:
"""Process a batch of executions concurrently."""
if not settings.secrets.openai_internal_api_key:
raise HTTPException(status_code=500, detail="OpenAI API key not configured")
async def process_single_execution(execution) -> ExecutionAnalyticsResult:
try:
# Generate activity status and score using the specified model
# Convert stats to GraphExecutionStats if needed
if execution.stats:
if isinstance(execution.stats, GraphExecutionMeta.Stats):
stats_for_generation = execution.stats.to_db()
else:View on GitHub (pinned to 9c8bb5550f)