{"record":{"id":"7afeb4b522417fb8","repo":"tensorflow/models","slug":"source-folder-not-found-source-folder","errorCode":null,"errorMessage":"Source folder not found: {source_folder}","messagePattern":"Source folder not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py","lineNumber":154,"sourceCode":"\n\n# ── Image discovery and filtering ───────────────────────────────────────────\n\n\ndef get_subfolder_names(source_folder: str) -> list[str]:\n  \"\"\"Returns a sorted list of subfolder names in the source folder.\n\n  Args:\n      source_folder: Path to the root source folder.\n\n  Returns:\n      A sorted list of subfolder names. Empty list if none found.\n\n  Raises:\n      FileNotFoundError: If the source folder does not exist.\n  \"\"\"\n  if not os.path.isdir(source_folder):\n    raise FileNotFoundError(f\"Source folder not found: {source_folder}\")\n\n  return [\n      name\n      for name in sorted(os.listdir(source_folder))\n      if os.path.isdir(os.path.join(source_folder, name))\n  ]\n\n\ndef get_sorted_image_names(folder_path: str) -> list[str]:\n  \"\"\"Returns a naturally sorted list of image file names from a folder.\n\n  Args:\n      folder_path: Path to the folder containing images.\n\n  Returns:\n      A naturally sorted list of image file names.\n  \"\"\"\n  image_names = [","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py#L136-L172","documentation":"Error \"Source folder not found: {source_folder}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}