{"record":{"id":"869d4ed8dbfd253d","repo":"tensorflow/models","slug":"config-file-not-found-or-inaccessible-yaml-path","errorCode":null,"errorMessage":"Config file not found or inaccessible: {yaml_path}","messagePattern":"Config file not found or inaccessible: (.+?)","errorType":"exception","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py","lineNumber":346,"sourceCode":"  @classmethod\n  def from_yaml(cls, yaml_path: str) -> Self:\n    \"\"\"Parses the YAML file into a strictly typed configuration object.\n\n    Args:\n      yaml_path: Path to the YAML configuration file.\n\n    Returns:\n      A fully populated PipelineConfig.\n\n    Raises:\n      ConfigurationError: If the YAML file cannot be found, if the file content\n        is invalid YAML, or if configuration validation fails.\n    \"\"\"\n    try:\n      with open(yaml_path, \"r\", encoding=\"utf-8\") as file:\n        data = yaml.safe_load(file)\n    except OSError as err:\n      raise ConfigurationError(\n          f\"Config file not found or inaccessible: {yaml_path}\"\n      ) from err\n    except yaml.YAMLError as err:\n      raise ConfigurationError(\n          f\"Invalid YAML syntax in {yaml_path}: {err}\"\n      ) from err\n\n    if not isinstance(data, dict):\n      raise ConfigurationError(\n          f\"Configuration root in {yaml_path} must be a dictionary.\"\n      )\n\n    try:\n      prompt_configs = {}\n      for name, cfg in data[\"detection\"][\"configs\"].items():\n        cfg_copy = dict(cfg)\n        if \"crop_size\" in cfg_copy:\n          cfg_copy[\"crop_size\"] = tuple(cfg_copy[\"crop_size\"])","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py#L328-L364","documentation":"OSError translated to ConfigurationError in PipelineConfig.from_yaml: open() on yaml_path failed — the file does not exist, the path is a directory, or permissions deny reading. The original OSError is chained (from err). Wrapping keeps the pipeline's error surface uniform: callers only need to catch ConfigurationError for any config problem.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py:346 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the config path argument for typos; use an absolute path or the correct relative base","Create the YAML file if it has not been written yet","Fix file permissions (read access) if the file exists but cannot be opened","Ensure the path is a file, not a directory"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}