github/spec-kit · error · ValueError

{context.capitalize()} does not exist: {label}

Error message

{context.capitalize()} does not exist: {label}

What it means

Error "{context.capitalize()} does not exist: {label}" thrown in github/spec-kit.

Source

Thrown at src/specify_cli/shared_infra.py:205

    root = project_path.resolve()
    rel = _shared_relative_path(project_path, directory)
    current = project_path

    for part in rel.parts:
        current = current / part
        label = _shared_destination_label(project_path, current)
        if current.is_symlink():
            raise SymlinkedSharedPathError(f"Refusing to use symlinked {context}: {label}")
        if current.exists():
            if not current.is_dir():
                raise ValueError(f"{context.capitalize()} path is not a directory: {label}")
            try:
                current.resolve().relative_to(root)
            except (OSError, ValueError):
                raise ValueError(f"{context.capitalize()} escapes project root: {label}") from None
            continue
        if not create:
            raise ValueError(f"{context.capitalize()} does not exist: {label}")
        current.mkdir()
        if current.is_symlink():
            raise SymlinkedSharedPathError(f"Refusing to use symlinked {context}: {label}")
        try:
            current.resolve().relative_to(root)
        except (OSError, ValueError):
            raise ValueError(f"{context.capitalize()} escapes project root: {label}") from None


def _validate_safe_shared_directory(project_path: Path, directory: Path) -> None:
    """Validate existing directory parents while allowing missing directories."""
    root = project_path.resolve()
    rel = _shared_relative_path(project_path, directory)
    current = project_path

    for part in rel.parts:
        current = current / part
        label = _shared_destination_label(project_path, current)

View on GitHub (pinned to bf88c9f9a8)

Solutions

  1. Create the missing directory first, or correct the path.

When it happens

Trigger: Thrown at src/specify_cli/shared_infra.py:205 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/d5d5bef2f70b455c. Report an issue: GitHub.