from sbmlutils import parser
parser.sbml_to_model("iec1368_dh5a.sbml")
Context
I was able to get around the issue by simply adding a new else condition @parser.py (L248), going from this:
if r.isSetKineticLaw():
klaw: libsbml.KineticLaw = r.getKineticLaw()
if klaw.isSetMath():
ast = klaw.getMath()
else:
ast = None
formula = libsbml.formulaToL3String(ast) if ast else None
To this
if r.isSetKineticLaw():
klaw: libsbml.KineticLaw = r.getKineticLaw()
if klaw.isSetMath():
ast = klaw.getMath()
else:
ast = None
else:
ast = None
formula = libsbml.formulaToL3String(ast) if ast else None
I'm not at all familiar with the inner workings of this library but it seems that the first conditional is not met and so ast is never assigned to anything.
I searched for other issues in this repository but could not find anything. If this is a misuse on my end or an already contemplated/documented case feel free to close.
Problem description
Please explain:
what Could not parse a
sbml
file for E. Coli model.how The sbml file was downloaded from the fluxer webpage link
why I expected the sbml file to be parsed, instead I got the error message:
Code Sample
Create a minimal, complete, verifiable example.
Context
I was able to get around the issue by simply adding a new
else
condition @parser.py (L248), going from this:To this
I'm not at all familiar with the inner workings of this library but it seems that the first conditional is not met and so
ast
is never assigned to anything.I searched for other issues in this repository but could not find anything. If this is a misuse on my end or an already contemplated/documented case feel free to close.