apache/superset · error · ValidationError
Invalid UUID: {uuid}
Error message
Invalid UUID: {uuid} What it means
Raised by validate_folders() for an unnamed folder node whose uuid is neither a metric/column uuid present in valid_uuids nor one of DEFAULT_FOLDER_UUIDS. Unnamed nodes are pointers to real metrics/columns; if the uuid matches nothing on the dataset, the pointer is dangling and the structure is rejected.
Source
Thrown at superset/commands/dataset/update.py:478
fqn = tuple(path + [name])
if name and fqn in seen_fqns:
raise ValidationError(f"Duplicate folder name: {name}")
seen_fqns.add(fqn)
# Allow default folders (by UUID) to use reserved names
if (
name.lower() in {"metrics", "columns"}
and str(uuid) not in DEFAULT_FOLDER_UUIDS
):
raise ValidationError(f"Folder cannot have name '{name}'")
# check if metric/column UUID exists (skip default folders)
elif (
not name
and uuid not in valid_uuids
and str(uuid) not in DEFAULT_FOLDER_UUIDS
):
raise ValidationError(f"Invalid UUID: {uuid}")
# traverse children
if children := obj.get("children"):
path.append(uuid)
queue.extend((folder, path) for folder in children)
View on GitHub (pinned to f4587218dd)
Solutions
- Re-fetch the dataset's current columns/metrics and rebuild the folder leaves from uuids that exist (see validationCode).
- Remove the dangling node from the payload.
- When copying structures across datasets, remap leaf uuids to the target dataset's own column/metric uuids.
Example fix
# before
folders = [{"uuid": str(deleted_column_uuid)}] # Invalid UUID: ...
# after
valid = {str(c.uuid) for c in dataset.columns} | {str(m.uuid) for m in dataset.metrics}
folders = [{"uuid": u} for u in wanted_uuids if u in valid] Defensive patterns
Strategy: validation
Validate before calling
valid = {str(c.uuid) for c in dataset.columns} | {str(m.uuid) for m in dataset.metrics}
valid |= set(DEFAULT_FOLDER_UUIDS)
folders = [n for n in walk(folders) if n.get("name") or str(n["uuid"]) in valid]
assert all(n.get("name") or str(n["uuid"]) in valid for n in walk(folders)) Prevention
- Rebuild leaf uuids from the dataset's live columns/metrics on every save.
- Remap uuids when copying folder trees across datasets.
- Purge folder entries for deleted metrics/columns before submitting.
When it happens
Trigger: PUT /api/v1/dataset/{id} with a folder node without 'name' whose uuid references a metric or column that was deleted, belongs to another dataset, or is simply a typo'd uuid.
Common situations: Stale payloads: folder tree saved before a column/metric was removed, then resubmitted. Copying a folder structure between datasets — the leaf uuids don't exist on the target. Manual uuid edits.
Related errors
- Duplicate UUID in folder structure: {uuid}
- Cycle detected: {uuid} appears in its ancestry
- Duplicate folder name: {name}
- Folder cannot have name '{name}'
- Dataset parameters are invalid.
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/875a5235656589e4.
Report an issue: GitHub.