Skip to content
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 for not supported parameter names #85

Open
shoepfl opened this issue May 26, 2023 · 2 comments
Open

Error for not supported parameter names #85

shoepfl opened this issue May 26, 2023 · 2 comments

Comments

@shoepfl
Copy link

shoepfl commented May 26, 2023

Dear antimony team,

we currently conduct a reproducibility study with students. One team found out that the parameter name "gamma" is not working with antimony. However, the error message is very unspecific and it took us a while to figure out what the problem was:

Exception: Antimony: Error in model string, line 14: syntax error, unexpected '=', expecting '.' or element name or "'is'"

There should be some warning or specific error message for names that produce this error.

Attached you can find a working model without the parameter gamma (called "g" instead) and the antimony string that produces the error:
SERID antimony.zip

Best,
Sebastian

@luciansmith
Copy link
Contributor

Thank you for your report! This is actually kind of hard to support, because of design decisions I made 15 years ago that weren't great, but I'll see what I can do. The problem is that anything predefined in Antimony as one thing can't then be used as anything else, so you can't have a compartment named 'compartment' because 'compartment' is a keyword, for example. For this, 'gamma' is the name of a predefined distribution function, so now you can't use it elsewhere.

It's perfectly fine in SBML to mix things like this, and some day I might be able to recode the parser to be more flexible. In the mean time, I'll see if there's any tweaks I can make to the parser to at least be a little more clear what the problem is.

@shoepfl
Copy link
Author

shoepfl commented Aug 25, 2023

Hi Lucian,

thanks for your answer. Of course, I understand that not all predefined names can simply be given freely. With compartment etc. I would have thought of it sooner, but gamma was not on my mind at first. I think a simple warning or error message indicating which reserved names exist would be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants