RDFLib / OWL-RL

A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
http://www.ivan-herman.net/Misc/2008/owlrl/
Other
140 stars 30 forks source link

Reproducable - RDFS Inferencing crashes with KeyError #5

Closed ashleysommer closed 5 years ago

ashleysommer commented 5 years ago

RDFS Inferencing crashes when it encounters a value that is an RDF Literal with an appended datatype which is not in list of datatypes that the RDFS Semantic Ruleset knows how to handle.

This is an example of a Graph which will trigger this error. https://github.com/TopQuadrant/shacl/blob/master/src/test/resources/sh/tests/core/property/qualifiedValueShape-001.test.ttl Notice that file has a Triple like this:

ex:subject1 ex:related_type "has-component"^^ex:code

The datatype ex:code does not exist in the graph, but even if it did, the RDFS Semantic Ruleset does not have an entry in its RDF-to-Python literal table for ex:code thus crashes with a KeyError.

This is on the py3 branch, I'm not sure if the same problem occurs in the old Py2.7 version.