{"record":{"id":"012ed0097cb6627f","repo":"openai/openai-python","slug":"expected-a-non-empty-value-for-run-id-but-receiv-012ed0","errorCode":null,"errorMessage":"Expected a non-empty value for `run_id` but received {run_id!r}","messagePattern":"Expected a non-empty value for `run_id` but received (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/openai/resources/evals/runs/runs.py","lineNumber":152,"sourceCode":"        extra_body: Body | None = None,\n        timeout: float | httpx2.Timeout | None | NotGiven = not_given,\n    ) -> RunRetrieveResponse:\n        \"\"\"\n        Get an evaluation run by ID.\n\n        Args:\n          extra_headers: Send extra headers\n\n          extra_query: Add additional query parameters to the request\n\n          extra_body: Add additional JSON properties to the request\n\n          timeout: Override the client-level default timeout for this request, in seconds\n        \"\"\"\n        if not eval_id:\n            raise ValueError(f\"Expected a non-empty value for `eval_id` but received {eval_id!r}\")\n        if not run_id:\n            raise ValueError(f\"Expected a non-empty value for `run_id` but received {run_id!r}\")\n        return self._get(\n            path_template(\"/evals/{eval_id}/runs/{run_id}\", eval_id=eval_id, run_id=run_id),\n            options=make_request_options(\n                extra_headers=extra_headers,\n                extra_query=extra_query,\n                extra_body=extra_body,\n                timeout=timeout,\n                security={\"bearer_auth\": True},\n            ),\n            cast_to=RunRetrieveResponse,\n        )\n\n    def list(\n        self,\n        eval_id: str,\n        *,\n        after: str | Omit = omit,\n        limit: int | Omit = omit,","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/resources/evals/runs/runs.py#L134-L170","documentation":"The sync EvalRun.retrieve() method requires run_id to be non-empty for the path /evals/{eval_id}/runs/{run_id} and raises ValueError before making the request if the value is falsy.","triggerScenarios":"Calling client.evals.runs.retrieve() with run_id='' or None while eval_id is valid.","commonSituations":"The run creation response was not stored (run = client.evals.runs.create(...); run_id never extracted), or the id was read from persistence that contains empty values.","solutions":["Verify run_id came from a successful client.evals.runs.create() call (use its .id).","Log run_id before the call.","Validate persisted ids at load time.","Guard with an emptiness check."],"exampleFix":"# before\nrun = client.evals.runs.retrieve(eval_id=eval_id, run_id=run_id)\n\n# after\nif not run_id:\n    raise ValueError(f\"run_id is required, got {run_id!r}\")\nrun = client.evals.runs.retrieve(eval_id=eval_id, run_id=run_id)","handlingStrategy":"validation","validationCode":"if not isinstance(run_id, str) or not run_id.strip():\n    raise ValueError(f\"run_id must be a non-empty string, got {run_id!r}\")","typeGuard":"def is_valid_run_id(run_id: object) -> bool:\n    return isinstance(run_id, str) and bool(run_id.strip())","tryCatchPattern":"try:\n    run = client.evals.runs.retrieve(eval_id=eval_id, run_id=run_id)\nexcept ValueError as e:\n    if 'run_id' in str(e):\n        raise ValueError(f'Cannot retrieve run: {e}') from e\n    raise","preventionTips":["Extract run_id from the creation response's .id field.","Handle run-creation failures before using the id.","Validate persisted run ids at load time."],"tags":["openai","evals","value-error","path-parameter","client-side-validation"],"backgroundTag":"empty-required-parameter","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}