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

Semantic extraction from SBML fails with segmentation faults for example models #107

Open
jonrkarr opened this issue Jul 19, 2021 · 4 comments
Labels
resolved-but-awaiting-confirmation When an issue has been handled but waiting on confirmation that problem is resolved.

Comments

@jonrkarr
Copy link
Contributor

jonrkarr commented Jul 19, 2021

from pyomexmeta import RDF
import lxml.etree
import os

model_filename = 'toy-model.xml'

# verify file exists, is a syntactically-valid XML
assert os.path.isfile(model_filename)
lxml.etree.parse(model_filename)

rdf = RDF()
editor = rdf.to_editor(model_filename, generate_new_metaids=True, sbml_semantic_extraction=True)
editor.get_xml()

Failing examples:

For each example, I copied the model XML out of the above text files, saved it to a file, and then tried to use pyomexmetadata to extract metadata from it.

These failures each have invalid metaids (see #106). I don't know whether that's the reason or a coincidence.

Passing examples

@CiaranWelsh
Copy link
Contributor

Looks like the examples output folder in the master branch were outdated - the invalid metaids (that begin with #) have already been dealt with.

Note that the sbml strings that you have been looking at are the output from executing the examples. For instance, take a look at some of the docs rst files and look at the .. literalinclude commands.

So, these examples were not run prior to the last merge into master, most likely meaning that there is a bug in my cmake custom target that deals with running the docs examples.

@CiaranWelsh
Copy link
Contributor

Even with the old sbml code I cannot reproduce the segfault. What version of pyomexmeta are you using - the latest is v1.2.10. I'm currently using windows, what platform and version are you using please?

@jonrkarr
Copy link
Contributor Author

jonrkarr commented Aug 2, 2021

I found all of the issues I created in this environment (copied from #94)

pyomexmeta: 1.2.10
Python: 3.9.5
Ubuntu

@CiaranWelsh
Copy link
Contributor

Probably resolved by this issue. Leaving open until we get confirmation.

@CiaranWelsh CiaranWelsh added the resolved-but-awaiting-confirmation When an issue has been handled but waiting on confirmation that problem is resolved. label Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved-but-awaiting-confirmation When an issue has been handled but waiting on confirmation that problem is resolved.
Projects
None yet
Development

No branches or pull requests

2 participants