Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating the Graph in-memory #147

Open
acka47 opened this issue Sep 9, 2024 · 7 comments
Open

Error creating the Graph in-memory #147

acka47 opened this issue Sep 9, 2024 · 7 comments
Assignees
Labels
shacl validation Related to the SHACL validation algorithm shacl Related to SHACL

Comments

@acka47
Copy link
Contributor

acka47 commented Sep 9, 2024

When testing out rudof with the SkoHub shapes repo at https://github.com/skohub-io/skohub-shapes I ran into the follwoing problem:

~/git/skohub-shapes$ rudof shacl-validate -s skos.shacl.ttl tests/valid/skos.shacl.ttl/ex24.ttl 
Error: Error during the creation of the Graph: Error creating the Graph in-memory

It works fine when I do the same with Jena, though:

~/git/skohub-shapes$ shacl validate -s skos.shacl.ttl -d tests/valid/skos.shacl.ttl/ex24.ttl 
PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sh:   <http://www.w3.org/ns/shacl#>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>

[ rdf:type     sh:ValidationReport;
  sh:conforms  true
] .

I am on Linux Mint Debian Edition (LMDE) 6 (faye).

@labra labra added shacl validation Related to the SHACL validation algorithm shacl Related to SHACL labels Sep 9, 2024
@labra
Copy link
Contributor

labra commented Sep 9, 2024

Thanks for the issue. I was trying to check if rudof can at least parse the Turtle files, and one issue is that the file tests/valid/skos.shacl.ttl/ex24.ttl contains a node with a relative URI: <Protein> which at this moment the rudof Turtle parser reports as an error.

You can check if rudof parses an RDF data just running:

rudof data tests/valid/skos.shacl.ttl/ex24.ttl

and the more descriptive error message:

Error: Parser error between at line 7 between columns 1 and column 10: No scheme found in an absolute IRI

One simple solution is to add a base declaration to the file with a line like the following after the prefix declaration:

@base <http://example.org/> .

Nevertheless another solution we did in Shaclex was to include a default base declaration so relative URIs resolve to that URI. I have just added a new issue to consider it: #149

If you add the base declaration, you can see that the SHACL validator works as expected:

rudof shacl-validate -s skos.shacl.ttl tests/valid/skos.shacl.ttl/ex24.ttl                                                     13:07:43
Result:
Validation Report: [
        conforms: true,
        result:
]

We can keep this issue open until we solve #149

@acka47
Copy link
Contributor Author

acka47 commented Sep 9, 2024

Thanks for the quick response! It's very good to know about rudof data ... to check for parsing problems.

@labra
Copy link
Contributor

labra commented Sep 10, 2024

I have done some changes to the default configuration of the RDF data reader and now it takes a default base IRI (it can be customized through a config file) which allows to parse RDF files with relative IRIs.

A new release v0.1.24 is being published which I think solves your problem. If you try it and it works, let us know (you can just close this issue).

@acka47
Copy link
Contributor Author

acka47 commented Sep 10, 2024

Thanks, I will try it out tomorrow. Currently, I am sitting on a PC with Linux Mint 20.3 Cinnamon that has not the required libc6 version (2.31 and rudof requires >=2.34). Thus, I can not install it quickly on this machine.

@labra
Copy link
Contributor

labra commented Sep 10, 2024

Thanks, I will try it out tomorrow. Currently, I am sitting on a PC with Linux Mint 20.3 Cinnamon that has not the required libc6 version (2.31 and rudof requires >=2.34). Thus, I can not install it quickly on this machine.

No problem...just out of curiosity, you need libc6 because you compile it yourself, right? or is it necessary when you run from the distributed binary package?

@acka47
Copy link
Contributor Author

acka47 commented Sep 10, 2024

just out of curiosity, you need libc6 because you compile it yourself, right? or is it necessary when you run from the distributed binary package?

The error comes when trying to install the binary package:

$ sudo dpkg -i rudof_v0.1.24_amd64.deb 
(Reading database ... 1020037 files and directories currently installed.)
Preparing to unpack rudof_v0.1.24_amd64.deb ...
Unpacking rudof-cli (0.1.24-1) over (0.1.24-1) ...
dpkg: dependency problems prevent configuration of rudof-cli:
 rudof-cli depends on libc6 (>= 2.34); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.16.

dpkg: error processing package rudof-cli (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 rudof-cli

@labra
Copy link
Contributor

labra commented Sep 10, 2024

Thanks for the info...I created an independent issue #154 to investigate about the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shacl validation Related to the SHACL validation algorithm shacl Related to SHACL
Projects
None yet
Development

No branches or pull requests

3 participants