tensorflow/models · error · ValueError
field %s does not exist
Error message
field %s does not exist
What it means
Error "field %s does not exist" thrown in tensorflow/models.
Source
Thrown at official/vision/utils/object_detection/box_list.py:138
def get_field(self, field):
"""Accesses a box collection and associated fields.
This function returns specified field with object; if no field is specified,
it returns the box coordinates.
Args:
field: this optional string parameter can be used to specify a related
field to be accessed.
Returns:
a tensor representing the box collection or an associated field.
Raises:
ValueError: if invalid field
"""
if not self.has_field(field):
raise ValueError('field ' + str(field) + ' does not exist')
return self.data[field]
def set_field(self, field, value):
"""Sets the value of a field.
Updates the field of a box_list with a given value.
Args:
field: (string) name of the field to set value.
value: the value to assign to the field.
Raises:
ValueError: if the box_list does not have specified field.
"""
if not self.has_field(field):
raise ValueError('field %s does not exist' % field)
self.data[field] = value
View on GitHub (pinned to e006f5f0d5)
Solutions
- Add the field with add_field before reading it, or check the field name for typos.
- Use has_field to guard access to optional fields.
When it happens
Trigger: Thrown at official/vision/utils/object_detection/box_list.py:138 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/1c8e412eca347097.
Report an issue: GitHub.