diff --git a/encord/objects/classification_instance.py b/encord/objects/classification_instance.py index a40ddf74..850ae94a 100644 --- a/encord/objects/classification_instance.py +++ b/encord/objects/classification_instance.py @@ -690,7 +690,7 @@ def _is_selectable_child_attribute(self, attribute: Attribute) -> bool: def _check_within_range(self, frame: int) -> None: if frame < 0 or frame >= self._last_frame: raise LabelRowError( - f"The supplied frame of `{frame}` is not within the acceptable bounds of `0` to `{self._last_frame}`." + f"The supplied frame of `{frame}` is not within the acceptable bounds of `0` to `{self._last_frame}`. " f"Note: for non-geometric data (e.g. {DataType.AUDIO} and {DataType.PLAIN_TEXT}), " f"the entire file only has 1 frame." ) diff --git a/tests/objects/test_label_structure.py b/tests/objects/test_label_structure.py index 1a823d68..593dd25a 100644 --- a/tests/objects/test_label_structure.py +++ b/tests/objects/test_label_structure.py @@ -1134,7 +1134,8 @@ def test_audio_classification_exceed_max_frames(ontology, empty_audio_label_row: with pytest.raises(LabelRowError) as e: classification_instance.set_for_frames(frames=5000) - assert e.value.message == "The supplied frame of `5000` is not within the acceptable bounds of `0` to `1`." + assert e.value.message == ("The supplied frame of `5000` is not within the acceptable bounds of `0` to `1`. " + "Note: for non-geometric data (e.g. AUDIO and PLAIN_TEXT), the entire file only has 1 frame.") range_list = classification_instance.range_list assert len(range_list) == 1