While trying to use the gillespy2.importSBML('file') function, I got the following error:
EventError: GillesPy2 Event Assignment expression requires a valid string expression
Apparently, when one wants to import an SBML-model the gillespy2.import_SBML('file') will call the following lines (353-360) in the SBMLimport.py script.
assignments = event.getListOfEventAssignments()
for a in assignments:
.
.
.
gillespy_assignment = gillespy2.EventAssignment(a.getVariable(),
__get_math(a.getMath()))
gillespy_assignments.append(gillespy_assignment)
I checked my SBML model and the expressions where strings, so I checked all calls that are made within the EventAssignment function and everything worked.
But looking into gillespy2/core/events.py script, where the EventAssignment function is defined, a bit closer, one sees that the function needs three arguments to be passed.
While trying to use the
gillespy2.importSBML('file')
function, I got the following error:Apparently, when one wants to import an SBML-model the
gillespy2.import_SBML('file')
will call the following lines (353-360) in theSBMLimport.py
script.I checked my SBML model and the expressions where strings, so I checked all calls that are made within the
EventAssignment
function and everything worked. But looking intogillespy2/core/events.py
script, where theEventAssignment
function is defined, a bit closer, one sees that the function needs three arguments to be passed.So if I call the function manually and specify a name or just call it with specification of the inputs as follows
no error occurs. Hence, I guess the error is not in my SBML file but rather in the way the function is called in the
SBMLimport.py
script.