lambdamusic / Ontospy

Python library and command-line interface for inspecting and visualizing RDF models aka ontologies.
http://lambdamusic.github.io/Ontospy/
MIT License
221 stars 52 forks source link

Possible bug in OntoSpy - visualization of individuals #128

Open izaihrayeu opened 1 year ago

izaihrayeu commented 1 year ago

the following Exception is raised when running

ontospy gendocs 'GLEIF-CorporateActionIndividuals.rdf' --individuals --type 4

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ontospy/gendocs/media/templates/shared/d3_hiddendivs.html", line 300, in top-level template code

Is Direct Instance Of: {% for s in each.instance_of %}{{s.title}} {% if not loop.last %}|{% endif %} {% endfor %}

^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jinja2/runtime.py", line 417, in init self._iterator = self._to_iterator(iterable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jinja2/runtime.py", line 425, in _to_iterator return iter(iterable)

the ontology file can be found here https://github.com/edmcouncil/fibo/blob/master/CAE/CorporateEvents/GLEIF-CorporateActionIndividuals.rdf

I noticed the same error can be reproduced with other types (not only --type 4) when an ontology contains individuals