zylon-ai/private-gpt · error · RuntimeError

anthropic dependency not found in {PYPROJECT_FILE}

Error message

anthropic dependency not found in {PYPROJECT_FILE}

What it means

Error "anthropic dependency not found in {PYPROJECT_FILE}" thrown in zylon-ai/private-gpt.

Source

Thrown at scripts/update_claude_specs.py:71

        source,
        flags=re.MULTILINE,
    )
    if count == 0:
        raise RuntimeError(
            f"OPENAPI_SPEC_URL assignment not found in {OPENAPI_TEST_FILE}"
        )
    OPENAPI_TEST_FILE.write_text(updated, encoding="utf-8")


def update_anthropic_version(new_version: str) -> None:
    source = PYPROJECT_FILE.read_text(encoding="utf-8")
    updated, count = re.subn(
        r'"anthropic>=[\d.]+"',
        f'"anthropic>={new_version}"',
        source,
    )
    if count == 0:
        raise RuntimeError(f"anthropic dependency not found in {PYPROJECT_FILE}")
    PYPROJECT_FILE.write_text(updated, encoding="utf-8")


def sync_lock_file() -> None:
    print("\nRunning uv lock ...")
    subprocess.run(["uv", "lock"], check=True, cwd=ROOT)


def main() -> None:
    changed = False

    # --- OpenAPI spec URL ---
    print(f"Fetching OpenAPI spec URL from {ANTHROPIC_STATS_URL} ...")
    latest_url = fetch_openapi_spec_url()
    pinned_url = current_openapi_spec_url()

    if pinned_url == latest_url:
        print("  OpenAPI spec URL already up to date.")

View on GitHub (pinned to 4a030776a3)

Solutions

  1. Add the anthropic dependency to pyproject.toml before running the update script.
  2. Check that PYPROJECT_FILE points to the correct pyproject.toml path.
  3. Verify the dependency is listed under the expected dependency group/section the script searches.

When it happens

Trigger: Raised by update_claude_specs.py when the anthropic dependency entry is not found in pyproject.toml.

Common situations: The anthropic dependency was removed, renamed, or moved to another group in pyproject.toml; restore it or update the script to match the new layout.


AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15). Data as JSON: /api/errors/72bc47078b0622da. Report an issue: GitHub.