diff --git a/gillespy2/sbml/SBMLimport.py b/gillespy2/sbml/SBMLimport.py index 02c01b25b..100da7890 100644 --- a/gillespy2/sbml/SBMLimport.py +++ b/gillespy2/sbml/SBMLimport.py @@ -141,7 +141,10 @@ def __get_compartments(sbml_model, gillespy_model): for i in range(sbml_model.getNumCompartments()): compartment = sbml_model.getCompartment(i) name = compartment.getId() - value = compartment.getSize() + if compartment.isSetSize(): + value = compartment.getSize() + else: + value = 1 if name == "vol": gillespy_model.volume = value