From 877fed7c5aec4e3030545d4d87cfbc35689cd49a Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Wed, 11 Nov 2026 12:25:06 +0000 Subject: [PATCH 1/2] Test the exact JSON Builder error text with no sequence number --- .../tests/test_jsonbundler_sequence_required.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pipeline/fiftyone_pipeline_core/tests/test_jsonbundler_sequence_required.py b/pipeline/fiftyone_pipeline_core/tests/test_jsonbundler_sequence_required.py index 8cc8058b..45100d5f 100644 --- a/pipeline/fiftyone_pipeline_core/tests/test_jsonbundler_sequence_required.py +++ b/pipeline/fiftyone_pipeline_core/tests/test_jsonbundler_sequence_required.py @@ -50,7 +50,10 @@ def test_no_sequence_number_is_an_error_that_names_the_sequence_element( flowdata = pipeline.create_flowdata() with self.assertRaises(Exception) as caught: flowdata.process() - self.assertIn("Sequence Element", str(caught.exception)) + self.assertEqual( + "The JSON Builder needs a sequence number. Place a Sequence " + "Element before the JSON Builder in the Pipeline.", + str(caught.exception)) def test_no_json_is_set_when_the_error_is_suppressed(self): pipeline = bundler_only(suppress=True) From 2a049c5d470ce4f802cb14ce9ccfb9c53b83aa11 Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Wed, 11 Nov 2026 12:25:07 +0000 Subject: [PATCH 2/2] Give the specification's JSON Builder error text with no sequence number Every language gives the same text when no Sequence Element has produced a sequence number, as the JSON Builder page of the specification states. --- .../src/fiftyone_pipeline_core/jsonbundler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/jsonbundler.py b/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/jsonbundler.py index 030cba4a..6ddf50a3 100644 --- a/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/jsonbundler.py +++ b/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/jsonbundler.py @@ -108,9 +108,8 @@ def process_internal(self, flowdata): sequence = flowdata.evidence.get("query.sequence") if isinstance(sequence, bool) or not isinstance(sequence, int): raise Exception( - "The JSON Builder needs the sequence number that a Sequence " - "Element produces. A Sequence Element needs to be placed " - "before it in the Pipeline.") + "The JSON Builder needs a sequence number. Place a Sequence " + "Element before the JSON Builder in the Pipeline.") # Get every property on every FlowElement # Storing JavaScript properties in an extra section