{"record":{"id":"6b2707fad0ee8e2a","repo":"tensorflow/models","slug":"context-index-must-be-an-integer-got-channe","errorCode":null,"errorMessage":"{context}[{index}] must be an integer, got {channel_value!r}.","messagePattern":"(.+?)\\[(.+?)\\] must be an integer, got (.+?)\\.","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py","lineNumber":462,"sourceCode":"      raw_color: The value read from YAML; expected to be a three-element\n        sequence of integers in the range ``[0, 255]``.\n\n  Returns:\n      The color as an ``(r, g, b)`` tuple of ints.\n\n  Raises:\n      ConfigError: If the value is not three integers in the allowed range.\n  \"\"\"\n  context = \"rotation_fill_color\"\n  if not isinstance(raw_color, (list, tuple)) or len(raw_color) != 3:\n    raise ConfigError(\n        f\"{context} must be a list of exactly three integers \"\n        f\"in [{_MIN_RGB_VALUE}, {_MAX_RGB_VALUE}], got {raw_color!r}.\"\n    )\n  channels = []\n  for index, channel_value in enumerate(raw_color):\n    if isinstance(channel_value, bool) or not isinstance(channel_value, int):\n      raise ConfigError(\n          f\"{context}[{index}] must be an integer, got {channel_value!r}.\"\n      )\n    if not _MIN_RGB_VALUE <= channel_value <= _MAX_RGB_VALUE:\n      raise ConfigError(\n          f\"{context}[{index}] must be in \"\n          f\"[{_MIN_RGB_VALUE}, {_MAX_RGB_VALUE}], got {channel_value!r}.\"\n      )\n    channels.append(int(channel_value))\n  return (channels[0], channels[1], channels[2])\n\n\ndef _validate_augmentations(\n    raw_augmentations: Any, prompt_name: str\n) -> tuple[str, ...]:\n  \"\"\"Validates a prompt's augmentation list against the canonical set.\n\n  Args:\n      raw_augmentations: The value read from YAML; expected to be a non-empty","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L444-L480","documentation":"Error \"{context}[{index}] must be an integer, got {channel_value!r}.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:462 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"}