apache/superset · error · ReportScheduleTargetDashboardDeletedError
The dashboard this report targets was deleted. Restore the d
Error message
The dashboard this report targets was deleted. Restore the dashboard, or update the report to point at an active dashboard.
What it means
ReportScheduleTargetDashboardDeletedError raised in _get_url when dashboard_id is set but the dashboard relationship resolves to None — the symmetric guard to the chart-deleted error. Per the source comment, dashboard soft-delete support is rolling out separately; until a dashboard with dependent reports can be deleted, this branch is inert, but it keeps the deleted-target error vocabulary parallel across entities.
Source
Thrown at superset/commands/report/execute.py:505
# chart soft-deleted after this report was created (or attached via a
# validate/commit race with DeleteChartCommand) loads as ``None``
# while ``chart_id`` is still set. Without this guard the branch
# below silently falls through to the dashboard path and fails
# opaquely; raising here surfaces a clear, actionable error inside
# the state-machine envelope (ERROR log row + notification dispatch).
# Every content path (_get_screenshots, _get_csv_data,
# _get_embedded_data, _get_notification_content) funnels through this
# method, so this is the single choke point.
if chart is None and dashboard is None:
if self._report_schedule.chart_id is not None:
raise ReportScheduleTargetChartDeletedError()
# Symmetric guard for dashboard targets. Dashboard soft delete lands
# in the sibling rollout; until then this cannot fire (a dashboard
# with dependent reports cannot be deleted), which makes it inert
# rather than wrong — and it keeps the report-target error vocabulary
# parallel across entities from day one.
if self._report_schedule.dashboard_id is not None:
raise ReportScheduleTargetDashboardDeletedError()
# Defensive fallback for a malformed report with no target IDs.
# Missing relationships with a target ID are handled by the
# dedicated deleted-target errors above.
raise ReportScheduleUnexpectedError(
f"Report schedule {self._report_schedule.id} "
f"({self._report_schedule.name!r}) has no resolvable target "
f"(chart_id={self._report_schedule.chart_id}, "
f"dashboard_id={self._report_schedule.dashboard_id}); "
"the report has neither a chart nor a dashboard."
)
force = "true" if self._report_schedule.force_screenshot else "false"
if chart:
if result_format in {
ChartDataResultFormat.CSV,
ChartDataResultFormat.XLSX,
ChartDataResultFormat.JSON,
ChartDataResultFormat.XLSX,View on GitHub (pinned to f4587218dd)
Solutions
- Restore the dashboard from trash or update the report to target an active dashboard
- Delete or disable the orphaned report schedule if the dashboard is gone for good
- Handle this error together with ReportScheduleTargetChartDeletedError in a shared except clause
Defensive patterns
Strategy: try-catch
Validate before calling
def report_target_ok(report) -> bool:
return report.dashboard_id is None or report.dashboard is not None Type guard
def has_live_dashboard_target(report_schedule) -> bool:
"""True when the report either has no dashboard target or the dashboard is not soft-deleted."""
return report_schedule.dashboard_id is None or report_schedule.dashboard is not None Try / catch
try:
_get_url()
except (ReportScheduleTargetDashboardDeletedError, ReportScheduleTargetChartDeletedError):
notify_owner(report_schedule, 'target deleted; restore it or retarget the report') Prevention
- Restore-or-retarget policy for reports whose dashboards get trashed
- Audit dependent reports before deleting dashboards
- Keep handling symmetric with the chart variant so one clause covers both
When it happens
Trigger: Once dashboard soft-delete ships: a report targeting a dashboard that was soft-deleted, then executed. On builds without dashboard soft-delete it cannot fire, since deleting a dashboard with dependent reports is blocked.
Common situations: Hitting it on a version where dashboard soft-delete just landed and stale reports point at trashed dashboards; pre-emptive handling when writing uniform error-handling code for report targets.
Related errors
- The chart this report targets was deleted. Restore the chart
- Report schedule {id} ({name!r}) has no resolvable target (ch
- Screenshot failed; aborting to avoid sending a partial repor
- Failed taking a screenshot {str(ex)}
- validation_error
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/38a56b522dac1543.
Report an issue: GitHub.