-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error importing SBML model #455
Comments
The model is valid, but everything is written in a single line. It could be that the pysb parser is expecting the xml declaration in a separate line then the |
SyntaxError is raised when some Python code has a syntax error, which leads me to believe your problem lies elsewhere. Could you paste the entire stack trace, and ideally a minimal Python script that reproduces this error? Ultimately the SBML is parsed using libsbml which has no problem with the single long line. There is in fact a problem parsing the
I'm submitting a PR to PySB right now to fix the |
I take back what I said about the SyntaxError being unlikely, as I did notice sympy triggering that exception in certain cases due to its use of eval! Either way, the issue should be resolved by the forthcoming PR. |
BNGL models (and also SBML due to the conversion path) with piecewise expressions and logical/equality expressions will now parse into sympy expressions correctly. Piecewise expressions ('if' in BNGL) in particular would trigger an exception in the sympy parser. Fixes pysb#455
Hello everyone,
I found a problem trying to import an SBML model (https://www.ebi.ac.uk/compneur-srv/biomodels-main/MODEL1608100001). It seems the SBML file has something invalid
SyntaxError: invalid syntax (<string>, line 1)
for PySB. However, using the https://github.com/RuleWorld/BNGTutorial/blob/master/SBML/translateSBML.bngl file, I was able to translate the model into BNGL and simulate it.Thank you for your time,
Best regards
The text was updated successfully, but these errors were encountered: