{"record":{"id":"dbeefd9ac1d5d6e5","repo":"tensorflow/models","slug":"duplicate-files-found-in-destination-folder","errorCode":null,"errorMessage":"Duplicate files found in '{destination_folder}':\n  {conflict_list}","messagePattern":"Duplicate files found in '(.+?)':\n  (.+?)","errorType":"exception","errorClass":"FileExistsError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py","lineNumber":226,"sourceCode":") -> None:\n  \"\"\"Checks if any files already exist in the destination folder.\n\n  Args:\n      file_names: List of file names to check.\n      destination_folder: Path to the destination folder.\n\n  Raises:\n      FileExistsError: If any file names conflict with existing files.\n  \"\"\"\n  conflicting_files = [\n      name\n      for name in file_names\n      if os.path.exists(os.path.join(destination_folder, name))\n  ]\n\n  if conflicting_files:\n    conflict_list = \"\\n  \".join(conflicting_files)\n    raise FileExistsError(\n        f\"Duplicate files found in '{destination_folder}':\\n  {conflict_list}\"\n    )\n\n\ndef copy_files(\n    file_names: list[str],\n    source_folder: str,\n    destination_folder: str,\n) -> None:\n  \"\"\"Copies files from source to destination folder.\n\n  Args:\n      file_names: List of file names to copy.\n      source_folder: Path to the source folder.\n      destination_folder: Path to the destination folder.\n  \"\"\"\n  for file_name in file_names:\n    source_path = os.path.join(source_folder, file_name)","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py#L208-L244","documentation":"Error \"Duplicate files found in '{destination_folder}':\n  {conflict_list}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py:226 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"}