apache/superset · error · ReportScheduleScreenshotFailedError

Report Schedule execution failed when generating a screensho

Error message

Report Schedule execution failed when generating a screenshot.

What it means

ReportScheduleScreenshotFailedError with the default (parameterless) message: after the capture loop completes, if the imges list is empty the method raises this bare form. It means the screenshot list was empty without any exception — no captures were attempted or all were skipped upstream (e.g. zero URLs resolved for the target).

Source

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

                datetime.now(timezone.utc).replace(tzinfo=None) - start_time
            ).total_seconds()
            logger.error(
                "report_capture_terminal %s elapsed_seconds=%.2f "
                "remaining_seconds=%s terminal_reason=%s",
                self._log_context,
                elapsed_seconds,
                (
                    f"{self._report_execution_context.deadline.remaining_seconds:.2f}"
                    if self._report_execution_context
                    else None
                ),
                type(ex).__name__,
            )
            raise ReportScheduleScreenshotFailedError(
                f"Failed taking a screenshot {str(ex)}"
            ) from ex
        if not imges:
            raise ReportScheduleScreenshotFailedError()
        return imges

    def _get_pdf(self) -> bytes:
        """
        Get chart or dashboard pdf
        :raises: ReportSchedulePdfFailedError
        """
        screenshots = self._get_screenshots()
        reserve_seconds = (
            self._report_execution_context.post_capture_reserve_seconds
            if self._report_execution_context
            else 0.0
        )
        self._phase_timeout(
            "pdf_generation",
            reserve_seconds=reserve_seconds,
        )
        pdf = build_pdf_from_screenshots(screenshots)

View on GitHub (pinned to f4587218dd)

Solutions

  1. Check the report's extra JSON: dashboard anchor/tabs configuration must resolve to at least one URL
  2. Remove custom tab/anchor overrides so the report falls back to the plain dashboard URL
  3. Verify the target chart/dashboard still yields a URL via _get_url before the screenshot step
Defensive patterns

Strategy: validation

Validate before calling

def screenshot_urls_nonempty(urls: list[str]) -> bool:
    return len(urls) > 0

Try / catch

try:
    _get_screenshots()
except ReportScheduleScreenshotFailedError as ex:
    if not ex.args:  # bare raise = empty URL list
        fix_report_extra(report_schedule)  # repair tab/anchor config

Prevention

When it happens

Trigger: _get_screenshots called when the URL list for the report resolves to zero entries — a dashboard whose tab resolution produced no URLs, or a target configuration where the screenshot sources list is empty.

Common situations: Misconfigured dashboard 'dashboard' extra with tab filters that match nothing; edge cases in tabbed report config (ALERT_REPORT_TABS) yielding an empty URL set.

Related errors


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