{"record":{"id":"91d2ca25031340bc","repo":"apache/superset","slug":"failed-generating-dataframe-str-ex","errorCode":null,"errorMessage":"Failed generating dataframe {str(ex)}","messagePattern":"Failed generating dataframe (.+?)","errorType":"exception","errorClass":"ReportScheduleDataFrameFailedError","httpStatus":500,"severity":"error","filePath":"superset/commands/report/execute.py","lineNumber":1154,"sourceCode":"                \"DataFrame generation timeout after %.2fs - execution_id: %s\",\n                elapsed_seconds,\n                self._execution_id,\n            )\n            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.","sourceCodeStart":1136,"sourceCodeEnd":1172,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/execute.py#L1136-L1172","documentation":"Error \"Failed generating dataframe {str(ex)}\" thrown in apache/superset.","triggerScenarios":"Generating the CSV dataframe for a chart report fails.","commonSituations":"Generating a CSV dataframe for a report when the chart data query raises an unexpected exception.","solutions":["Check server logs for the exception while building the report dataframe.","Verify the chart's saved query context still runs successfully in Explore."],"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"}