diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-02-12 12:17:34 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-02-12 12:17:34 +0100 |
commit | 27697c537df10f764750602d81b3807523236b23 (patch) | |
tree | c5e57a5e9a0145851da4e7f8b2278b518daa8fae | |
parent | 486690f31dfe8da33fbd0711137844424d0321eb (diff) |
PTAModel.to_json: Handle missing states due to --filter-observations
-rw-r--r-- | lib/model.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 ) |