langchain-ai/deepagents · error · ToolRequirementIntrospectionError
uv tool receipt contains a non-table requirement entry
Error message
uv tool receipt contains a non-table requirement entry
What it means
Within [tool].requirements of the uv receipt, one entry is not a table (dict) as uv normally writes. The library iterates requirements expecting {name = ..., extras = [...]} style entries and refuses to guess when an entry is a scalar or array.
Source
Thrown at libs/code/deepagents_code/update_check.py:2967
Yields:
Each requirement's declared `name` and its full table entry, in receipt
order.
Raises:
ToolRequirementIntrospectionError: If `[tool].requirements` is missing or
contains an entry that is not a table with a package name.
"""
tool = data.get("tool")
requirements = tool.get("requirements") if isinstance(tool, dict) else None
if not isinstance(requirements, list):
msg = "uv tool receipt is missing `[tool].requirements`"
raise ToolRequirementIntrospectionError(msg)
for entry in requirements:
if not isinstance(entry, dict):
msg = "uv tool receipt contains a non-table requirement entry"
raise ToolRequirementIntrospectionError(msg)
name = entry.get("name")
if not isinstance(name, str) or not name:
msg = "uv tool receipt contains a requirement without a package name"
raise ToolRequirementIntrospectionError(msg)
yield name, entry
def _uv_tool_python(
tool_root: Path | None = None,
*,
data: dict[str, Any] | None = None,
) -> str | None:
"""Return the Python interpreter recorded in the uv tool receipt.
Args:
tool_root: Optional uv tool environment root. Defaults to `sys.prefix`.
data: Optional pre-parsed receipt contents. Supplied by callers that
read several receipt fields at once so the file is parsed onceView on GitHub (pinned to a1af029e6e)
Solutions
- Fix the entry to be a table: use `[[tool.requirements]]` blocks with at least a `name` field.
- Regenerate the receipt with `uv tool install deepagents-code --force` rather than editing it manually.
- Compare against a known-good receipt from a fresh uv install to confirm the expected schema.
Example fix
// before: string entries (invalid) [tool] requirements = ["deepagents-code"] // after: table entries (valid) [[tool.requirements]] name = "deepagents-code"
Defensive patterns
Strategy: validation
Validate before calling
import tomllib
def requirements_are_tables(data: dict) -> bool:
reqs = (data.get('tool') or {}).get('requirements', [])
return isinstance(reqs, list) and all(isinstance(r, dict) for r in reqs) Type guard
def is_table_requirement(entry: object) -> bool:
return isinstance(entry, dict) and isinstance(entry.get('name'), str) Try / catch
try:
pkgs = _uv_tool_with_packages()
except ToolRequirementIntrospectionError:
subprocess.run(['uv', 'tool', 'install', 'deepagents-code', '--force'], check=True) Prevention
- Write requirements as [[tool.requirements]] tables, never string lists.
- Do not convert the receipt TOML through other formats that flatten tables.
- Regenerate via uv rather than editing receipts by hand.
- Diff suspicious receipts against one from a clean `uv tool install`.
When it happens
Trigger: _iter_uv_tool_requirements encounters a requirements list element that is not a dict — e.g. a bare string requirement like "deepagents-code" instead of a [[tool.requirements]] table.
Common situations: Receipt hand-edited to use strings instead of [[tool.requirements]] tables; a receipt from a different/older uv format; file corrupted or truncated mid-entry.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- uv tool receipt is missing `[tool].requirements`
- uv tool receipt contains a requirement without a package nam
- uv tool receipt is missing `[tool]`
- uv tool receipt contains an invalid `[tool].python` value
- uv tool receipt requirement {name!r} uses source fields that
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/865dceea26ac043f.
Report an issue: GitHub.