{"record":{"id":"317fddecfec39754","repo":"apache/superset","slug":"report-schedule-execution-failed-when-generating-a","errorCode":null,"errorMessage":"Report Schedule execution failed when generating a screenshot.","messagePattern":"Report Schedule execution failed when generating a screenshot\\.","errorType":"exception","errorClass":"ReportScheduleScreenshotFailedError","httpStatus":500,"severity":"error","filePath":"superset/commands/report/execute.py","lineNumber":849,"sourceCode":"                datetime.now(timezone.utc).replace(tzinfo=None) - start_time\n            ).total_seconds()\n            logger.error(\n                \"report_capture_terminal %s elapsed_seconds=%.2f \"\n                \"remaining_seconds=%s terminal_reason=%s\",\n                self._log_context,\n                elapsed_seconds,\n                (\n                    f\"{self._report_execution_context.deadline.remaining_seconds:.2f}\"\n                    if self._report_execution_context\n                    else None\n                ),\n                type(ex).__name__,\n            )\n            raise ReportScheduleScreenshotFailedError(\n                f\"Failed taking a screenshot {str(ex)}\"\n            ) from ex\n        if not imges:\n            raise ReportScheduleScreenshotFailedError()\n        return imges\n\n    def _get_pdf(self) -> bytes:\n        \"\"\"\n        Get chart or dashboard pdf\n        :raises: ReportSchedulePdfFailedError\n        \"\"\"\n        screenshots = self._get_screenshots()\n        reserve_seconds = (\n            self._report_execution_context.post_capture_reserve_seconds\n            if self._report_execution_context\n            else 0.0\n        )\n        self._phase_timeout(\n            \"pdf_generation\",\n            reserve_seconds=reserve_seconds,\n        )\n        pdf = build_pdf_from_screenshots(screenshots)","sourceCodeStart":831,"sourceCodeEnd":867,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/execute.py#L831-L867","documentation":"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).","triggerScenarios":"_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.","commonSituations":"Misconfigured dashboard 'dashboard' extra with tab filters that match nothing; edge cases in tabbed report config (ALERT_REPORT_TABS) yielding an empty URL set.","solutions":["Check the report's extra JSON: dashboard anchor/tabs configuration must resolve to at least one URL","Remove custom tab/anchor overrides so the report falls back to the plain dashboard URL","Verify the target chart/dashboard still yields a URL via _get_url before the screenshot step"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"def screenshot_urls_nonempty(urls: list[str]) -> bool:\n    return len(urls) > 0","typeGuard":null,"tryCatchPattern":"try:\n    _get_screenshots()\nexcept ReportScheduleScreenshotFailedError as ex:\n    if not ex.args:  # bare raise = empty URL list\n        fix_report_extra(report_schedule)  # repair tab/anchor config","preventionTips":["Keep the report's extra.dashboard config minimal; custom tab filters can resolve to zero URLs","Test tabbed report config on a dashboard copy before scheduling","Treat a bare screenshot-failed error as a config smell, not a worker failure"],"tags":["alerts-reports","screenshot","configuration"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}