sys-bio / libOmexMeta

libOmexMeta is a library aimed at providing developer-level support for reading, writing, editing and managing semantic annotations for biosimulation models.
https://sys-bio.github.io/libOmexMeta/
Apache License 2.0
8 stars 6 forks source link

Iteration over new Logger data structure crashes with segmentation faults #134

Open jonrkarr opened 3 years ago

jonrkarr commented 3 years ago

Before realizing that len(...) does work to get the number of messages in the Logger data structure, I tried a couple of other ways to get all of the message. Unfortunately, they failed with segmentation faults.

Try to get list of messages

invalid_filename = 'invalid.rdf'
import pyomexmeta
rdf = pyomexmeta.RDF.from_file(invalid_filename, 'rdfxml')
list(pyomexmeta.Logger())

Try to iterate over list of messages

invalid_filename = 'invalid.rdf'
import pyomexmeta
rdf = pyomexmeta.RDF.from_file(invalid_filename, 'rdfxml')
for message in pyomexmeta.Logger():
    pass

Version: 1.2.13 Python: 3.9.5 OS: Ubuntu