{"record":{"id":"865dceea26ac043f","repo":"langchain-ai/deepagents","slug":"uv-tool-receipt-contains-a-non-table-requirement-e","errorCode":null,"errorMessage":"uv tool receipt contains a non-table requirement entry","messagePattern":"uv tool receipt contains a non-table requirement entry","errorType":"exception","errorClass":"ToolRequirementIntrospectionError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/update_check.py","lineNumber":2967,"sourceCode":"\n    Yields:\n        Each requirement's declared `name` and its full table entry, in receipt\n            order.\n\n    Raises:\n        ToolRequirementIntrospectionError: If `[tool].requirements` is missing or\n            contains an entry that is not a table with a package name.\n    \"\"\"\n    tool = data.get(\"tool\")\n    requirements = tool.get(\"requirements\") if isinstance(tool, dict) else None\n    if not isinstance(requirements, list):\n        msg = \"uv tool receipt is missing `[tool].requirements`\"\n        raise ToolRequirementIntrospectionError(msg)\n\n    for entry in requirements:\n        if not isinstance(entry, dict):\n            msg = \"uv tool receipt contains a non-table requirement entry\"\n            raise ToolRequirementIntrospectionError(msg)\n        name = entry.get(\"name\")\n        if not isinstance(name, str) or not name:\n            msg = \"uv tool receipt contains a requirement without a package name\"\n            raise ToolRequirementIntrospectionError(msg)\n        yield name, entry\n\n\ndef _uv_tool_python(\n    tool_root: Path | None = None,\n    *,\n    data: dict[str, Any] | None = None,\n) -> str | None:\n    \"\"\"Return the Python interpreter recorded in the uv tool receipt.\n\n    Args:\n        tool_root: Optional uv tool environment root. Defaults to `sys.prefix`.\n        data: Optional pre-parsed receipt contents. Supplied by callers that\n            read several receipt fields at once so the file is parsed once","sourceCodeStart":2949,"sourceCodeEnd":2985,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/update_check.py#L2949-L2985","documentation":"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.","triggerScenarios":"_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.","commonSituations":"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.","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."],"exampleFix":"// before: string entries (invalid)\n [tool]\n requirements = [\"deepagents-code\"]\n// after: table entries (valid)\n [[tool.requirements]]\n name = \"deepagents-code\"","handlingStrategy":"validation","validationCode":"import tomllib\n\ndef requirements_are_tables(data: dict) -> bool:\n    reqs = (data.get('tool') or {}).get('requirements', [])\n    return isinstance(reqs, list) and all(isinstance(r, dict) for r in reqs)","typeGuard":"def is_table_requirement(entry: object) -> bool:\n    return isinstance(entry, dict) and isinstance(entry.get('name'), str)","tryCatchPattern":"try:\n    pkgs = _uv_tool_with_packages()\nexcept ToolRequirementIntrospectionError:\n    subprocess.run(['uv', 'tool', 'install', 'deepagents-code', '--force'], check=True)","preventionTips":["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`."],"tags":["uv","receipt-schema","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}