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

[BUG] Issue with SPARQL path in Fuseki documentation #702

Closed
ibrahimfathy2 opened this issue Sep 24, 2024 · 3 comments
Closed

[BUG] Issue with SPARQL path in Fuseki documentation #702

ibrahimfathy2 opened this issue Sep 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ibrahimfathy2
Copy link

Community Note

  • Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the bug

%%graph_notebook_config
{
  "host": "localhost",
  "port": 3030,
  "ssl": false,
  "sparql": {
    "path": "ds/sparql"
  }
}

This config found in graph-notebook/tree/main/additional-databases/fuseki didn't run the queries successfully, the only config that succeeded was path: "ds" not "ds/sparql"

  • OS: [Dockerfile]
  • Browser: [Google Chrome]
  • Graph Notebook Version: [3.7.3]
  • Apache Jena Fuseki Version: 5.1.0

To Reproduce
Steps to reproduce the behavior:

  1. Create a new cell
  2. write
%%sparql --expand-all
SELECT ?s ?p ?o
WHERE { ?s ?p ?o }
  1. Run
  2. Throws an error {'error': AttributeError("'DataFrame' object has no attribute 'map'")}
@ibrahimfathy2 ibrahimfathy2 added the bug Something isn't working label Sep 24, 2024
@michaelnchin
Copy link
Member

Hi @ibrahimfathy2 , thank you for submitting an issue!

This config found in graph-notebook/tree/main/additional-databases/fuseki didn't run the queries successfully, the only config that succeeded was path: "ds" not "ds/sparql"

I tried out both [dataset] and [dataset]/sparql paths on Fuseki 5.1.0 + graph-notebook 4.6.0. It looks like Fuseki allows the extra /sparql path for read queries, but not update queries. Both read and write work fine in the base [dataset] path.

3c22fb5e1f47:apache-jena-fuseki-5.1.0 chnmch$ ./fuseki-server --update --mem /ds
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
21:45:31 INFO  Server          :: Apache Jena Fuseki 5.1.0
21:45:31 INFO  Config          :: FUSEKI_HOME=/Users/chnmch/Downloads/apache-jena-fuseki-5.1.0/.
21:45:31 INFO  Config          :: FUSEKI_BASE=/Users/chnmch/Downloads/apache-jena-fuseki-5.1.0/run
21:45:31 INFO  Config          :: Shiro file: file:///Users/chnmch/Downloads/apache-jena-fuseki-5.1.0/run/shiro.ini
21:45:31 INFO  Config          :: Template file: templates/config-mem
21:45:32 INFO  Server          :: Database: in-memory
21:45:32 INFO  Server          :: Path = /ds
21:45:32 INFO  Server          ::   Memory: 4.0 GiB
21:45:32 INFO  Server          ::   Java:   21.0.4
21:45:32 INFO  Server          ::   OS:     Mac OS X 14.4.1 x86_64
21:45:32 INFO  Server          ::   PID:    50417
21:45:32 INFO  Server          :: Started 2024/09/24 21:45:32 PDT on port 3030
21:45:50 INFO  Fuseki          :: [1] POST http://localhost:3030/ds/sparql
21:45:50 INFO  Fuseki          :: [1] 400 Bad Request (26 ms)
21:45:50 INFO  Fuseki          :: [2] POST http://localhost:3030/ds/sparql
21:45:50 INFO  Fuseki          :: [2] 400 Bad Request (0 ms)
21:46:07 INFO  Fuseki          :: [3] POST http://localhost:3030/ds
21:46:07 INFO  Fuseki          :: [3] 200 OK (44 ms)
21:46:29 INFO  Fuseki          :: [4] POST http://localhost:3030/ds/sparql
21:46:29 INFO  Fuseki          :: [4] Query = SELECT ?s ?p ?o WHERE {?s ?p ?o} LIMIT 10 
21:46:29 INFO  Fuseki          :: [4] 200 OK (44 ms)
21:46:55 INFO  Fuseki          :: [5] POST http://localhost:3030/ds
21:46:55 INFO  Fuseki          :: [5] Query = SELECT ?s ?p ?o WHERE {?s ?p ?o} LIMIT 10 
21:46:55 INFO  Fuseki          :: [5] 200 OK (12 ms)

Not sure if something changed Fuseki side paths since that documentation was contributed, but your suggestion looks valid. I'll add an update to the current docs, thanks!

@michaelnchin michaelnchin changed the title [BUG] [BUG] Issue with SPARQL path in Fuseki documentation Sep 25, 2024
@michaelnchin
Copy link
Member

Regarding:

Graph Notebook Version: [3.7.3]

%%sparql --expand-all
SELECT ?s ?p ?o
WHERE { ?s ?p ?o }

Throws an error {'error': AttributeError("'DataFrame' object has no attribute 'map'")}

To match, I tried downgrading my graph-notebook version from 4.6.0 to 3.7.3. This also broke my ability to use %%sparql against Fuseki 5.1.0.

Graph-notebook v3.7.3 is over 2.5 years old at this point, and may not have the best compatibility with the latest graph database versions. Can you try upgrading to graph-notebook v4.6.0 and see if that resolves the issue?

@michaelnchin
Copy link
Member

Closing due to 30 days of inactivity. Please re-open if you have additional questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Resolved
Development

No branches or pull requests

2 participants