From 18833d12f225c5e8c0d3434795aba9afa29b9e50 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 12 Jun 2024 22:00:56 +0200 Subject: [PATCH] .. --- python/sdist/amici/petab/sbml_import.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/sdist/amici/petab/sbml_import.py b/python/sdist/amici/petab/sbml_import.py index 3217b1bf5d..6c9141f908 100644 --- a/python/sdist/amici/petab/sbml_import.py +++ b/python/sdist/amici/petab/sbml_import.py @@ -266,7 +266,8 @@ def import_model_sbml( initial_states = get_states_in_condition_table(petab_problem) requires_preequilibration = ( - petab.PREEQUILIBRATION_CONDITION_ID in petab_problem.measurement_df + petab_problem.measurement_df is not None + and petab.PREEQUILIBRATION_CONDITION_ID in petab_problem.measurement_df and petab_problem.measurement_df[petab.PREEQUILIBRATION_CONDITION_ID] .notnull() .any() @@ -313,7 +314,9 @@ def import_model_sbml( "Adding preequilibration indicator " f"constant {PREEQ_INDICATOR_ID}" ) - logger.debug(f"Adding initial assignments for {initial_states.keys()}") + logger.debug( + f"Adding initial assignments for {list(initial_states.keys())}" + ) for assignee_id in initial_states: init_par_id_preeq = f"initial_{assignee_id}_preeq" init_par_id_sim = f"initial_{assignee_id}_sim"