From 27697c537df10f764750602d81b3807523236b23 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 12 Feb 2024 12:17:34 +0100 Subject: PTAModel.to_json: Handle missing states due to --filter-observations --- lib/model.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/model.py') diff --git a/lib/model.py b/lib/model.py index 1c0ee01..5844113 100644 --- a/lib/model.py +++ b/lib/model.py @@ -1101,7 +1101,12 @@ class PTAModel(AnalyticModel): for origin, destination in self.get_transition_states_from_traces( transition ): - pta.add_transition(origin, destination, transition) + try: + pta.add_transition(origin, destination, transition) + except KeyError as e: + logger.warning( + f"to_json: Missing transition ({e}). Note that --filter-observation is incompatible with JSON export." + ) pta.update( param_info, static_error=static_quality, function_error=analytic_quality ) -- cgit v1.2.3