RDFLib / pyLODE

An OWL ontology documentation tool using Python and templating, based on LODE
BSD 3-Clause "New" or "Revised" License
169 stars 70 forks source link

fix utils.py to not load contents as file paths #217

Closed JaeTLDR closed 6 months ago

JaeTLDR commented 6 months ago

Looks like PyLode is attempting to open a file with ontology however if this is a serialised graph the server can error trying to load this file image

I have added a small simple detection logic however it may be simpler to pass the ontology variable to RDFLib and get it to do the path vs graph and the file type detection rather than rolling its own. Additionally i noticed a lack of strip() on the imput, this may cause errors with the data type detection not firing corretly

edmondchuc commented 6 months ago

Thanks, I've refactored the code a bit and added a test.