{"record":{"id":"d253997bd8c0fd18","repo":"apache/superset","slug":"report-schedule-execution-failed-when-generating-a-d25399","errorCode":null,"errorMessage":"Report Schedule execution failed when generating a csv.","messagePattern":"Report Schedule execution failed when generating a csv\\.","errorType":"exception","errorClass":"ReportScheduleCsvFailedError","httpStatus":500,"severity":"error","filePath":"superset/commands/report/execute.py","lineNumber":1158,"sourceCode":"            if self._report_schedule.type == ReportScheduleType.REPORT:\n                raise\n            raise ReportScheduleDataFrameTimeout() from ex\n        except ReportExecutionBudgetExceededError:\n            raise\n        except Exception as ex:\n            elapsed_seconds = (\n                datetime.now(timezone.utc).replace(tzinfo=None) - start_time\n            ).total_seconds()\n            logger.error(\n                \"DataFrame generation failed after %.2fs - execution_id: %s\",\n                elapsed_seconds,\n                self._execution_id,\n            )\n            raise ReportScheduleDataFrameFailedError(\n                f\"Failed generating dataframe {str(ex)}\"\n            ) from ex\n        if dataframe is None:\n            raise ReportScheduleCsvFailedError()\n        return dataframe\n\n    def _update_query_context(\n        self,\n        failed_error: type[CommandException] = ReportScheduleCsvFailedError,\n    ) -> None:\n        \"\"\"\n        Update chart query context.\n\n        To load data from the endpoint the chart must have been saved\n        with its query context. For charts without saved query context we\n        get a screenshot to force the chart to produce and save the query\n        context. ``failed_error`` lets the caller surface a format-specific\n        failure (e.g. Excel vs CSV) when the screenshot fallback fails.\n        \"\"\"\n        try:\n            self._get_screenshots()\n        except (","sourceCodeStart":1140,"sourceCodeEnd":1176,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/execute.py#L1140-L1176","documentation":"Error \"Report Schedule execution failed when generating a csv.\" thrown in apache/superset.","triggerScenarios":"CSV generation fails during report schedule execution.","commonSituations":"Report schedule execution aborted because CSV/dataframe generation failed upstream.","solutions":["Verify the chart query succeeds and the worker has write access to its temp storage; then retry the schedule."],"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-15T22:17:37.221Z"}