{"record":{"id":"289610a68ed5271e","repo":"zylon-ai/private-gpt","slug":"openapi-spec-url-assignment-not-found-in-openapi","errorCode":null,"errorMessage":"OPENAPI_SPEC_URL assignment not found in {OPENAPI_TEST_FILE}","messagePattern":"OPENAPI_SPEC_URL assignment not found in (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"scripts/update_claude_specs.py","lineNumber":57,"sourceCode":"    return spec_url\n\n\ndef current_anthropic_version() -> str:\n    source = PYPROJECT_FILE.read_text(encoding=\"utf-8\")\n    match = re.search(r'\"anthropic>=([\\d.]+)\"', source)\n    return match.group(1) if match else \"<not found>\"\n\n\ndef update_openapi_spec_url(new_url: str) -> None:\n    source = OPENAPI_TEST_FILE.read_text(encoding=\"utf-8\")\n    updated, count = re.subn(\n        r'^(OPENAPI_SPEC_URL\\s*=\\s*\")[^\"]*(\")',\n        rf\"\\g<1>{new_url}\\g<2>\",\n        source,\n        flags=re.MULTILINE,\n    )\n    if count == 0:\n        raise RuntimeError(\n            f\"OPENAPI_SPEC_URL assignment not found in {OPENAPI_TEST_FILE}\"\n        )\n    OPENAPI_TEST_FILE.write_text(updated, encoding=\"utf-8\")\n\n\ndef update_anthropic_version(new_version: str) -> None:\n    source = PYPROJECT_FILE.read_text(encoding=\"utf-8\")\n    updated, count = re.subn(\n        r'\"anthropic>=[\\d.]+\"',\n        f'\"anthropic>={new_version}\"',\n        source,\n    )\n    if count == 0:\n        raise RuntimeError(f\"anthropic dependency not found in {PYPROJECT_FILE}\")\n    PYPROJECT_FILE.write_text(updated, encoding=\"utf-8\")\n\n\ndef sync_lock_file() -> None:","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/scripts/update_claude_specs.py#L39-L75","documentation":"Error \"OPENAPI_SPEC_URL assignment not found in {OPENAPI_TEST_FILE}\" thrown in zylon-ai/private-gpt.","triggerScenarios":"Raised by update_claude_specs.py when the OPENAPI_SPEC_URL assignment cannot be located in the OpenAPI test file.","commonSituations":"The test file's constant was renamed or reformatted; update the script's search pattern or restore the assignment in the test file.","solutions":["Ensure the test file contains an assignment of the form OPENAPI_SPEC_URL = '...' for the script to update.","Check that OPENAPI_TEST_FILE points to the correct test file path.","Add the OPENAPI_SPEC_URL assignment to the test file manually if it was removed or renamed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}