tensorflow/models · error · ConfigError
{context} must be a list of exactly three integers in [{_MIN
Error message
{context} must be a list of exactly three integers in [{_MIN_RGB_VALUE}, {_MAX_RGB_VALUE}], got {raw_color!r}. What it means
Error "{context} must be a list of exactly three integers in [{_MIN_RGB_VALUE}, {_MAX_RGB_VALUE}], got {raw_color!r}." thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:455
def _validate_rotation_fill_color(
raw_color: Any,
) -> tuple[int, int, int]:
"""Validates the rotation fill color entry into an RGB tuple.
Args:
raw_color: The value read from YAML; expected to be a three-element
sequence of integers in the range ``[0, 255]``.
Returns:
The color as an ``(r, g, b)`` tuple of ints.
Raises:
ConfigError: If the value is not three integers in the allowed range.
"""
context = "rotation_fill_color"
if not isinstance(raw_color, (list, tuple)) or len(raw_color) != 3:
raise ConfigError(
f"{context} must be a list of exactly three integers "
f"in [{_MIN_RGB_VALUE}, {_MAX_RGB_VALUE}], got {raw_color!r}."
)
channels = []
for index, channel_value in enumerate(raw_color):
if isinstance(channel_value, bool) or not isinstance(channel_value, int):
raise ConfigError(
f"{context}[{index}] must be an integer, got {channel_value!r}."
)
if not _MIN_RGB_VALUE <= channel_value <= _MAX_RGB_VALUE:
raise ConfigError(
f"{context}[{index}] must be in "
f"[{_MIN_RGB_VALUE}, {_MAX_RGB_VALUE}], got {channel_value!r}."
)
channels.append(int(channel_value))
return (channels[0], channels[1], channels[2])
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:455 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/6a6fed6c0918abba.
Report an issue: GitHub.