Open RiX012 opened 2 years ago
Hi @RiX012 Thanks for the report. The Table output is a relatively new feature in PySHACL, and it hasn't had much real-world testing. I can see where the problem lies, the table generator expects the SHACL constraint to define a sh:message, and it wants to print the message in the table. But in your case, where the shape's constraint does not have a message, the table generator fails. I can put a fix in the next release to address it.
Just out of curiosity, are you able to show the contents of your shapes.ttl
file that you're using here? Most SHACL constraints have a default message built in, so I'd like to see which constraints you are using to see if I can add in another default message somewhere.
@RiX012 This is now fixed in new release v0.19.1
Just out of curiosity, are you able to show the contents of your
shapes.ttl
file that you're using here? Most SHACL constraints have a default message built in, so I'd like to see which constraints you are using to see if I can add in another default message somewhere.
Thanks for fixing so fast. Works perfect now! No problem sharing:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix def: <http://example.org/def/> .
@prefix nen2660: <https://w3id.org/nen2660/def#> .
def: a owl:Ontology .
nen2660:hasPart
a owl:ObjectProperty ;
.
nen2660:RealObject
a sh:NodeShape, owl:Class ;
sh:property [
sh:path nen2660:hasPart ;
sh:class nen2660:RealObject
] ;
.
def:Car
rdf:type sh:NodeShape , owl:Class ;
rdfs:subClassOf nen2660:RealObject ;
sh:property [ sh:path nen2660:hasPart ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1 ;
sh:qualifiedValueShape [ sh:class def:Wheel ] ;
] ;
.
def:Wheel
rdf:type sh:NodeShape , owl:Class .
def:Door
rdf:type sh:NodeShape , owl:Class .
All goes well until i ask for
table
output. Error message:I am not a coder, just trying to use the validator. What is wrong here?