{"record":{"id":"82c32da42edfc500","repo":"openai/openai-python","slug":"expected-a-non-empty-value-for-skill-id-but-rece-82c32d","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/versions/versions.py","lineNumber":98,"sourceCode":"    ) -> SkillVersion:\n        \"\"\"\n        Create a new immutable skill version.\n\n        Args:\n          default: Whether to set this version as the default.\n\n          files: Skill files to upload (directory upload) or a single zip file.\n\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        body = deepcopy_with_paths(\n            {\n                \"default\": default,\n                \"files\": files,\n            },\n            [[\"files\", \"<array>\"], [\"files\"]],\n        )\n        extracted_files = extract_files(cast(Mapping[str, object], body), paths=[[\"files\", \"<array>\"], [\"files\"]])\n        if extracted_files:\n            # It should be noted that the actual Content-Type header that will be\n            # sent to the server will contain a `boundary` parameter, e.g.\n            # multipart/form-data; boundary=---abc--\n            extra_headers = {\"Content-Type\": \"multipart/form-data\", **(extra_headers or {})}\n        return self._post(\n            path_template(\"/skills/{skill_id}/versions\", skill_id=skill_id),\n            body=maybe_transform(body, version_create_params.VersionCreateParams),\n            files=extracted_files,\n            options=make_request_options(","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/resources/skills/versions/versions.py#L80-L116","documentation":"Sync skill-version creation (POST /skills/{skill_id}/versions) validates skill_id before building the multipart body with 'default' and 'files'. The guard fires before any file reading or deepcopy_with_paths processing, so no bytes are wasted on an invalid target skill.","triggerScenarios":"Calling client.skills.versions.create(skill_id=\"\", files=[...]) — uploading a new version to an ID that was never set, None, or an empty string.","commonSituations":"Upload scripts parameterized by env/config where SKILL_ID is unset; CI publishing pipelines that forgot to export the variable; template code with a placeholder \"\".","solutions":["Set the target skill ID from client.skills.create() or an existing skill's id","Fail fast if os.environ.get('SKILL_ID') is empty in the script","Dry-run print the parameters before upload"],"exampleFix":"# before\nv = client.skills.versions.create(skill_id=\"\", files=[...])\n\n# after\nskill_id = os.environ[\"SKILL_ID\"]\nv = client.skills.versions.create(skill_id=skill_id, files=[...])","handlingStrategy":"validation","validationCode":"skill_id = os.environ.get(\"SKILL_ID\", \"\")\nif not skill_id.strip():\n    raise SystemExit(\"SKILL_ID must be set to a valid skill id\")\nclient.skills.versions.create(skill_id=skill_id, files=files)","typeGuard":"def is_valid_skill_id(value: object) -> bool:\n    return isinstance(value, str) and bool(value.strip())","tryCatchPattern":null,"preventionTips":["Fail fast on unset env/config IDs in upload scripts","Create the parent skill first and thread its id into version uploads","Print resolved parameters before starting large file uploads"],"tags":["skills","versions","create","upload","validation"],"backgroundTag":"required-parameter-missing","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}