{"record":{"id":"c63b8e3857817e56","repo":"openai/openai-python","slug":"expected-a-non-empty-value-for-skill-id-but-rece-c63b8e","errorCode":null,"errorMessage":"Expected a non-empty value for `skill_id` but received {skill_id!r}","messagePattern":"Expected a non-empty value for `skill_id` but received (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/openai/resources/skills/skills.py","lineNumber":150,"sourceCode":"        extra_headers: Headers | None = None,\n        extra_query: Query | None = None,\n        extra_body: Body | None = None,\n        timeout: float | httpx2.Timeout | None | NotGiven = not_given,\n    ) -> Skill:\n        \"\"\"\n        Get a skill by its 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 skill_id:\n            raise ValueError(f\"Expected a non-empty value for `skill_id` but received {skill_id!r}\")\n        return self._get(\n            path_template(\"/skills/{skill_id}\", skill_id=skill_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=Skill,\n        )\n\n    def update(\n        self,\n        skill_id: str,\n        *,\n        default_version: str,\n        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/resources/skills/skills.py#L132-L168","documentation":"Sync Skills.retrieve validates that skill_id is non-empty before building GET /skills/{skill_id}. This is a client-side ArgumentError-style guard common to all generated path-parameter methods, ensuring the templated URL would not degrade to /skills/ or /skills/None.","triggerScenarios":"Calling client.skills.retrieve(skill_id=\"\"), retrieve(None), or retrieve(skill_id=some_empty_var). The check is `if not skill_id`, so empty string, None, and other falsy values all trigger it.","commonSituations":"Copy-pasting sample code and forgetting to substitute the ID; deriving IDs from dict.get(\"id\") on an object that uses a different key; blank entries in bulk-processing scripts.","solutions":["Pass a real skill ID returned from client.skills.create() or list()","Validate the variable before the call: if not skill_id: ...","When deriving from a response, confirm the field name (id) and that the object was created successfully"],"exampleFix":"# before\nskill = client.skills.retrieve(skill_id=\"\")\n\n# after\nskill = client.skills.retrieve(skill_id=\"skill-abc123\")","handlingStrategy":"validation","validationCode":"assert isinstance(skill_id, str) and skill_id, f\"skill_id must be set, got {skill_id!r}\"\nskill = client.skills.retrieve(skill_id=skill_id)","typeGuard":"def is_valid_skill_id(value: object) -> bool:\n    return isinstance(value, str) and bool(value.strip())","tryCatchPattern":null,"preventionTips":["Capture IDs from create()/list() responses instead of literals or env guesses","Name variables explicitly (skill_id) to avoid passing empty placeholders","Add a lint/unit check that exercises the retrieve path with realistic data"],"tags":["skills","validation","path-parameter","argument-error"],"backgroundTag":"required-parameter-missing","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}