{"record":{"id":"8b64e3421ac11006","repo":"apache/superset","slug":"report-schedule-execution-got-an-unexpected-error","errorCode":null,"errorMessage":"Report Schedule execution got an unexpected error.","messagePattern":"Report Schedule execution got an unexpected error\\.","errorType":"exception","errorClass":"ReportScheduleExecuteUnexpectedError","httpStatus":500,"severity":"error","filePath":"superset/commands/report/execute.py","lineNumber":2059,"sourceCode":"    Execute all types of report schedules.\n    - On reports takes chart or dashboard screenshots and sends configured notifications\n    - On Alerts uses related Command AlertCommand and sends configured notifications\n    \"\"\"\n\n    def __init__(self, task_id: str, model_id: int, scheduled_dttm: datetime):\n        self._model_id = model_id\n        self._model: Optional[ReportSchedule] = None\n        self._scheduled_dttm = scheduled_dttm\n        self._execution_id = UUID(task_id)\n\n    def run(self) -> None:\n        monotonic_started_at = time.monotonic()\n        report_execution_context: ReportExecutionContext | None = None\n        owns_report_working_state = False\n        try:\n            self.validate()\n            if not self._model:\n                raise ReportScheduleExecuteUnexpectedError()\n\n            if self._model.type == ReportScheduleType.REPORT:\n                # An invocation that enters on WORKING is a duplicate or stale\n                # recovery, not the owner that created the active row. Its state\n                # handler may terminalize a stale execution, but the command\n                # boundary must never infer ownership from a replayed UUID.\n                owns_report_working_state = (\n                    self._model.last_state != ReportState.WORKING\n                )\n                total_seconds = resolve_report_execution_budget_seconds(\n                    app.config,\n                    working_timeout=self._model.working_timeout,\n                )\n                deadline = ReportExecutionDeadline(\n                    total_seconds=total_seconds,\n                    started_at=monotonic_started_at,\n                )\n                dashboard = self._model.dashboard","sourceCodeStart":2041,"sourceCodeEnd":2077,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/execute.py#L2041-L2077","documentation":"Error \"Report Schedule execution got an unexpected error.\" thrown in apache/superset.","triggerScenarios":"An unhandled exception interrupts report schedule execution.","commonSituations":"Report schedule run hits an unhandled exception outside the known timeout/screenshot/data paths.","solutions":["Inspect worker logs for the unexpected exception and retry the schedule after resolving it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}