apache/superset · error · ReportScheduleDataFrameFailedError

Failed generating dataframe

Error message

Failed generating dataframe {str(ex)}

What it means

Error "Failed generating dataframe {str(ex)}" thrown in apache/superset.

Solutions

  1. Check server logs for the exception while building the report dataframe.
  2. Verify the chart's saved query context still runs successfully in Explore.

When it happens

Trigger: Generating the CSV dataframe for a chart report fails.

Common situations: Generating a CSV dataframe for a report when the chart data query raises an unexpected exception.


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/91d2ca25031340bc. Report an issue: GitHub.

Appendix: source

Thrown at superset/commands/report/execute.py:1154

                "DataFrame generation timeout after %.2fs - execution_id: %s",
                elapsed_seconds,
                self._execution_id,
            )
            if self._report_schedule.type == ReportScheduleType.REPORT:
                raise
            raise ReportScheduleDataFrameTimeout() from ex
        except ReportExecutionBudgetExceededError:
            raise
        except Exception as ex:
            elapsed_seconds = (
                datetime.now(timezone.utc).replace(tzinfo=None) - start_time
            ).total_seconds()
            logger.error(
                "DataFrame generation failed after %.2fs - execution_id: %s",
                elapsed_seconds,
                self._execution_id,
            )
            raise ReportScheduleDataFrameFailedError(
                f"Failed generating dataframe {str(ex)}"
            ) from ex
        if dataframe is None:
            raise ReportScheduleCsvFailedError()
        return dataframe

    def _update_query_context(
        self,
        failed_error: type[CommandException] = ReportScheduleCsvFailedError,
    ) -> None:
        """
        Update chart query context.

        To load data from the endpoint the chart must have been saved
        with its query context. For charts without saved query context we
        get a screenshot to force the chart to produce and save the query
        context. ``failed_error`` lets the caller surface a format-specific
        failure (e.g. Excel vs CSV) when the screenshot fallback fails.

View on GitHub (pinned to f4587218dd)