From c0732cf31ef178f5774396cac34a70b23f7e11f8 Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Thu, 11 Jan 2024 11:24:08 +0100 Subject: [PATCH] #39 : clear error message caused by test for existence --- basico/model_info.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/basico/model_info.py b/basico/model_info.py index f192090..6c45f5d 100644 --- a/basico/model_info.py +++ b/basico/model_info.py @@ -5336,6 +5336,10 @@ def add_parameter_set(name, param_set_dict=None, **kwargs): if sets.getByName(name) is not None: raise ValueError('Parameter set with name "{}" already exists'.format(name)) + # if we are here, the parameter set does not exist yet, unfortunately + # the test added a message, so lets remove it + COPASI.CCopasiMessage.getLastMessage() + if param_set_dict is None: # create parameter set from current state new_set = COPASI.CModelParameterSet(name)