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

Calling getThing with the IRI of a Blank Node throws Error #1752

Open
danielbakas opened this issue Nov 10, 2022 · 3 comments
Open

Calling getThing with the IRI of a Blank Node throws Error #1752

danielbakas opened this issue Nov 10, 2022 · 3 comments
Labels
bug Something isn't working Triaged This means that we've a ticket to look at this in the future

Comments

@danielbakas
Copy link

Search terms you've used

  • Blank Node

Bug description

I was trying to iterate all things from a Dataset, but getThing throws an error if the subject URI is a Blank Node (_:example)

To Reproduce

  1. Declare a Solid resource resource with a thing Thing with a Blank Node as subject: _:Thing
  2. `const dataset = await getSolidDataset(resourceURI, {fetch})
  3. const thing = getThing(dataset, "_:Thing")

Expected result

A Thing with a Blank Node as subject URI and no errors.

Actual result

The following error:

  • Error: Expected a valid URL to identify a Thing, but received: [_:Thing].

Environment

$ npx envinfo --system --npmPackages --binaries --npmGlobalPackages --browsers
  System:
    OS: macOS 13.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 1.33 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.3 - ~/Documents/Profesional/Semantyk/Projects/Semantyk/client/node_modules/.bin/npm
  Browsers:
    Chrome: 107.0.5304.110
    Safari: 16.1
  npmPackages:
    @comunica/query-sparql-solid: ^2.3.0 => 2.3.0 
    @inrupt/solid-client: ^1.23.3 => 1.23.3 
    @inrupt/solid-ui-react: ^2.8.2 => 2.8.2 
    @inrupt/vocab-common-rdf: ^1.0.5 => 1.0.5 
    @react-three/drei: ^9.40.0 => 9.40.0 
    @react-three/fiber: ^8.9.1 => 8.9.1 
    @testing-library/jest-dom: ^5.16.5 => 5.16.5 
    @testing-library/react: ^13.4.0 => 13.4.0 
    @testing-library/user-event: ^14.4.3 => 14.4.3 
    bootstrap: ^5.2.2 => 5.2.2 
    lamina: ^1.1.23 => 1.1.23 
    node-fetch: ^3.2.10 => 3.2.10 
    npm: ^8.19.3 => 8.19.3 
    rdflib: ^2.2.20 => 2.2.20 
    react: ^18.2.0 => 18.2.0 
    react-bootstrap: ^2.5.0 => 2.5.0 
    react-dom: ^18.2.0 => 18.2.0 
    react-force-graph: ^1.41.15 => 1.41.15 
    react-helmet-async: ^1.3.0 => 1.3.0 
    react-router-dom: ^6.4.3 => 6.4.3 
    react-scripts: 5.0.1 => 5.0.1 
    stream-to-string: ^1.2.0 => 1.2.0 
    three: ^0.146.0 => 0.146.0 
    three-forcegraph: ^1.39.7 => 1.39.7 
    web-vitals: ^3.0.4 => 3.0.4 
  npmGlobalPackages:
    npm: 8.19.2

Additional information

  • I was trying to get all subjects from https://jeff-zucker.solidcommunity.net/sp4/glossary-data.ttl which has a few Blank Nodes as subjects
@danielbakas danielbakas added the bug Something isn't working label Nov 10, 2022
@ThisIsMissEm
Copy link
Contributor

I suspect this may be related to: #1545

Though it might be worth testing if this works for you:

const thing = getThing(dataset, getSourceIri(dataset) + "_:Thing")

@ThisIsMissEm
Copy link
Contributor

Also related: #1511

@ThisIsMissEm
Copy link
Contributor

Seems to also be in #948

@ThisIsMissEm ThisIsMissEm added the Triaged This means that we've a ticket to look at this in the future label Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triaged This means that we've a ticket to look at this in the future
Projects
None yet
Development

No branches or pull requests

2 participants