affaan-m/ECC · error · ValueError

Path does not exist: {path}

Error message

Path does not exist: {path}

What it means

Error "Path does not exist: {path}" thrown in affaan-m/ECC.

Source

Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:171

    """
    path = Path(path_str).expanduser().resolve()

    # Block paths that escape into system directories
    # We block specific system paths but allow temp dirs (/var/folders on macOS)
    blocked_prefixes = [
        "/etc", "/usr", "/bin", "/sbin", "/proc", "/sys",
        "/var/log", "/var/run", "/var/lib", "/var/spool",
        # macOS resolves /etc → /private/etc
        "/private/etc",
        "/private/var/log", "/private/var/run", "/private/var/db",
    ]
    path_s = str(path)
    for prefix in blocked_prefixes:
        if path_s.startswith(prefix + "/") or path_s == prefix:
            raise ValueError(f"Path '{path}' targets a system directory")

    if must_exist and not path.exists():
        raise ValueError(f"Path does not exist: {path}")

    return path


def _validate_instinct_id(instinct_id: str) -> bool:
    """Validate instinct IDs before using them in filenames."""
    if not instinct_id or len(instinct_id) > 128:
        return False
    if "/" in instinct_id or "\\" in instinct_id:
        return False
    if ".." in instinct_id:
        return False
    if instinct_id.startswith("."):
        return False
    return bool(re.match(r"^[A-Za-z0-9][A-Za-z0-9._-]*$", instinct_id))


def _validate_import_url(source: str) -> str:

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Create the directory first or correct the path; paths validated with must_exist=True must already exist on disk.
  2. Check for typos, missing mounts, or a relative path resolving to an unexpected location.

Example fix

mkdir -p "$HOME/.ecc/projects/myproj" && instinct-cli --path "$HOME/.ecc/projects/myproj"

When it happens

Trigger: Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:171 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/184feb335270e8c0. Report an issue: GitHub.