{"record":{"id":"5dba324e7d87cf43","repo":"openai/openai-python","slug":"expected-a-non-empty-value-for-fine-tuning-job-id","errorCode":null,"errorMessage":"Expected a non-empty value for `fine_tuning_job_id` but received {fine_tuning_job_id!r}","messagePattern":"Expected a non-empty value for `fine_tuning_job_id` but received (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/openai/resources/fine_tuning/jobs/checkpoints.py","lineNumber":73,"sourceCode":"    ) -> SyncCursorPage[FineTuningJobCheckpoint]:\n        \"\"\"\n        List checkpoints for a fine-tuning job.\n\n        Args:\n          after: Identifier for the last checkpoint ID from the previous pagination request.\n\n          limit: Number of checkpoints to retrieve.\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 fine_tuning_job_id:\n            raise ValueError(f\"Expected a non-empty value for `fine_tuning_job_id` but received {fine_tuning_job_id!r}\")\n        return self._get_api_list(\n            path_template(\"/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints\", fine_tuning_job_id=fine_tuning_job_id),\n            page=SyncCursorPage[FineTuningJobCheckpoint],\n            options=make_request_options(\n                extra_headers=extra_headers,\n                extra_query=extra_query,\n                extra_body=extra_body,\n                timeout=timeout,\n                query=maybe_transform(\n                    {\n                        \"after\": after,\n                        \"limit\": limit,\n                    },\n                    checkpoint_list_params.CheckpointListParams,\n                ),\n                security={\"bearer_auth\": True},\n            ),\n            model=FineTuningJobCheckpoint,","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/openai/openai-python/blob/9917c6e28e66e90e1227b3d223c06a8c5441515a/src/openai/resources/fine_tuning/jobs/checkpoints.py#L55-L91","documentation":"The sync FineTuningJobs.Checkpoints.list method requires a non-empty fine_tuning_job_id path parameter and checks it before requesting /fine_tuning/jobs/{id}/checkpoints. None or \"\" raises ValueError client-side.","triggerScenarios":"Calling `client.fine_tuning.jobs.checkpoints.list(fine_tuning_job_id=None)`, typically when a created job returned no ID or a variable was never assigned.","commonSituations":"Using the response object instead of response.id; job creation failed earlier and the error was swallowed; reading the job ID from env/config that is unset.","solutions":["Pass the job ID string, e.g. `job.id` from client.fine_tuning.jobs.create(...)","Assign and check the ID right after job creation","If reading from config, fail fast with a clear message when it is missing"],"exampleFix":"# before\njob = client.fine_tuning.jobs.create(...)\nclient.fine_tuning.jobs.checkpoints.list(fine_tuning_job_id=None)\n# after\nclient.fine_tuning.jobs.checkpoints.list(fine_tuning_job_id=job.id)","handlingStrategy":"validation","validationCode":"if not fine_tuning_job_id:\n    raise ValueError(\"fine_tuning_job_id is required\")","typeGuard":"def is_job_id(v: object) -> bool:\n    return isinstance(v, str) and v.startswith(\"ftjob-\")","tryCatchPattern":null,"preventionTips":["Use job.id from jobs.create immediately","Persist job IDs for later checkpoint queries"],"tags":["python","fine-tuning","checkpoints","path-parameter","valueerror"],"backgroundTag":"required-parameter-empty","analyzedSha":"9917c6e28e66e90e1227b3d223c06a8c5441515a","analyzedAt":"2026-08-28T11:46:34.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}