github/spec-kit · error · PresetValidationError

Unsupported schema version: {self.data['schema_version']} (e

Error message

Unsupported schema version: {self.data['schema_version']} (expected {self.SCHEMA_VERSION})

What it means

Error "Unsupported schema version: {self.data['schema_version']} (expected {self.SCHEMA_VERSION})" thrown in github/spec-kit.

Source

Thrown at src/specify_cli/presets/__init__.py:314

            raise PresetValidationError(f"Could not read manifest {path}: {e}")
        if data is None:
            return {}
        if not isinstance(data, dict):
            raise PresetValidationError(
                f"Manifest must be a YAML mapping, got {type(data).__name__}: {path}"
            )
        return data

    def _validate(self):
        """Validate manifest structure and required fields."""
        # Check required top-level fields
        for field in self.REQUIRED_FIELDS:
            if field not in self.data:
                raise PresetValidationError(f"Missing required field: {field}")

        # Validate schema version
        if self.data["schema_version"] != self.SCHEMA_VERSION:
            raise PresetValidationError(
                f"Unsupported schema version: {self.data['schema_version']} "
                f"(expected {self.SCHEMA_VERSION})"
            )

        for section in ("preset", "requires", "provides"):
            if not isinstance(self.data[section], dict):
                raise PresetValidationError(
                    f"Invalid {section}: expected a mapping"
                )

        # Validate preset metadata
        pack = self.data["preset"]
        # Check presence AND type: the format/version checks below feed these
        # values straight to ``re.match`` and ``packaging.Version``, both of
        # which raise a bare TypeError on a non-string. YAML makes that an easy
        # authoring slip -- unquoted ``version: 1.0`` parses as a float and
        # ``id: 2`` as an int -- and TypeError is not a PresetValidationError,
        # so it escapes every caller that already handles a malformed manifest

View on GitHub (pinned to bf88c9f9a8)

Solutions

  1. Set schema_version in the preset manifest to the supported SCHEMA_VERSION value.

When it happens

Trigger: Thrown at src/specify_cli/presets/__init__.py:314 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14). Data as JSON: /api/errors/746c333bbff9f3a4. Report an issue: GitHub.