Hi, I tried using this library in combination with rdflib (version 6.2.0) and I found a bug, that occurs when you pass an instance of an rdflib.Graph into the constructor of pylode.OntDoc:
Traceback (most recent call last):
File "/home/denis/workspace/Job/testarea/pylode_test/test_pylode.py", line 7, in <module>
ontdoc = pylode.OntDoc(graph)
File "/home/denis/workspace/Job/testarea/pylode_test/env/lib/python3.10/site-packages/pylode/ontdoc.py", line 104, in __init__
self._ontdoc_inference(self.ont)
File "/home/denis/workspace/Job/testarea/pylode_test/env/lib/python3.10/site-packages/pylode/ontdoc.py", line 154, in _ontdoc_inference
for s_ in g.subjects(RDF.type, OWL.Class):
File "/home/denis/workspace/Job/testarea/pylode_test/env/lib/python3.10/site-packages/rdflib/graph.py", line 746, in subjects
for s, p, o in self.triples((None, predicate, object)):
AttributeError: 'URIRef' object has no attribute 'triples'
The problem was rather simple: The cast method was used in the wrong order, resulting in the wrong passed result type.
Hi, I tried using this library in combination with
rdflib
(version6.2.0
) and I found a bug, that occurs when you pass an instance of anrdflib.Graph
into the constructor ofpylode.OntDoc
:Which raises the error:
The problem was rather simple: The
cast
method was used in the wrong order, resulting in the wrong passed result type.