langchain-ai/langgraph · error · IsADirectoryError

{label.capitalize()} must be a file: {resolved}

Error message

{label.capitalize()} must be a file: {resolved}

What it means

Error "{label.capitalize()} must be a file: {resolved}" thrown in langchain-ai/langgraph.

Source

Thrown at libs/cli/langgraph_cli/uv_lock.py:759

    import_str: str,
    plan: UvLockPlan,
    *,
    label: str,
) -> str:
    module_str, _, attr_str = import_str.partition(":")
    if not module_str or not attr_str:
        raise ValueError(
            f'Import string "{import_str}" must be in format "<module>:<attribute>".'
        )

    if "/" not in module_str and "\\" not in module_str:
        return import_str

    resolved = (config_path.parent / module_str).resolve()
    if not resolved.exists():
        raise FileNotFoundError(f"Could not find {label}: {resolved}")
    if not resolved.is_file():
        raise IsADirectoryError(f"{label.capitalize()} must be a file: {resolved}")

    container_path = _resolve_uv_lock_container_path(resolved, plan)
    if container_path is None:
        copied_dirs = ", ".join(
            package.root.relative_to(plan.project_root).as_posix() or "."
            for package in plan.install_order
        )
        raise click.UsageError(
            f"{label.capitalize()} '{import_str}' resolves to {resolved}, which is "
            f"not inside the target package '{plan.target.name}' or any of its "
            f"workspace dependencies. Only these directories are copied into the "
            f"container: {copied_dirs}. If this file lives in another workspace "
            f"package, add it as a dependency of '{plan.target.name}' with "
            "`{ workspace = true }` in [tool.uv.sources]."
        )

    return f"{container_path.as_posix()}:{attr_str}"

View on GitHub (pinned to 38031739e5)

When it happens

Trigger: Thrown at libs/cli/langgraph_cli/uv_lock.py:759 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26). Data as JSON: /api/errors/14b54541dd1a9768. Report an issue: GitHub.