tensorflow/models · error · ConfigError
must be a list of exactly three integers in [ , ], got .
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
Raised in _validate_rotation_fill_color when rotation_fill_color is not a list/tuple of exactly three integers (validated against [0, 255]).
Solutions
- Provide exactly three integers, e.g. rotation_fill_color: [128, 128, 128].
- Each element must be an integer in [0, 255].
- Check YAML formatting so the value parses as a flat 3-element list.
Defensive patterns
Strategy: validation
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.
Appendix: 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)