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

Connection problem in JQuery getJSON. when using default web interface #608

Closed
WolfgangFahl opened this issue Feb 19, 2022 · 13 comments
Closed

Comments

@WolfgangFahl
Copy link

I have configure my server now behing a apache proxy the forwards all traffic to port 7001. Now a web ui appears but queries won't work:
grafik

@WolfgangFahl
Copy link
Author

The firefox web debug interface shows:
grafik

@hannahbast
Copy link
Member

hannahbast commented Feb 19, 2022

Oh wow, this UI is obsolete and you shouldn't even see it.

The red error message in the development console (F12) tells you what the problem is. Please post the full text here. In your screenshot, it is abbreviated and the part with the actual error message is missing.

@WolfgangFahl
Copy link
Author

@hannahbast thx for the quick reponse. I couldn't get the qlever-ui to work ad-freiburg/qlever-ui#38 and ad-freiburg/qlever-ui#43 and mostly i resort to the sparqlquery command line now. Still i'd like to e.g try out queries and federated queries.

Uncaught TypeError: str.split is not a function
    tsep http://qlever.bitplan.com/script.js:210
    handleStatsDisplay http://qlever.bitplan.com/script.js:224
    jQuery 4
[script.js:210:19](http://qlever.bitplan.com/script.js)
    tsep http://qlever.bitplan.com/script.js:210
    handleStatsDisplay http://qlever.bitplan.com/script.js:224
    jQuery 4
getJSON on URI: /?query=%23%20Mountains%20higher%20than%208000%20m%0A%23%20fixes%3A%0A%23%20https%3A%2F%2Fqlever.cs.uni-freiburg.de%2Fwikidata%2FF7JXq3%0A%23%20see%20https%3A%2F%2Fgithub.com%2Fad-freiburg%2Fqlever%2Fissues%2F604%0APREFIX%20wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20p%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2F%3E%0APREFIX%20psn%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fstatement%2Fvalue-normalized%2F%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fmountain%20%3Fmountain_label%20(MAX(%3FelevationValues)%20AS%20%3Felevation)%20(SAMPLE(%3FcoordinateValues)%20AS%20%3Fcoordinates)%20WHERE%20%7B%0A%20%20%3Fmountain%20wdt%3AP31%20wd%3AQ8502%20.%0A%20%20%3Fmountain%20p%3AP2044%2Fpsn%3AP2044%2Fwikibase%3AquantityAmount%20%3FelevationValues%20.%0A%20%20%3Fmountain%20wdt%3AP625%20%3FcoordinateValues%20.%0A%20%20%3Fmountain%20rdfs%3Alabel%20%3Fmountain_label%20.%0A%20%20FILTER(%3FelevationValues%20%3E%3D%208000.0)%20.%0A%20%20FILTER%20(LANG(%3Fmountain_label)%20%3D%20%22en%22)%0A%7D%0AGROUP%20BY%20%3Fmountain%20%3Fmountain_label%0AORDER%20BY%20DESC(%3Felevation)&cmd=clearcache&send=100 [script.js:157:13](http://qlever.bitplan.com/script.js)
textStatus: error [script.js:200:17](http://qlever.bitplan.com/script.js)
errorThrown: Bad Request [script.js:201:17](http://qlever.bitplan.com/script.js)
getJSON on URI: /?query=%23%20Mountains%20higher%20than%208000%20m%0A%23%20fixes%3A%0A%23%20https%3A%2F%2Fqlever.cs.uni-freiburg.de%2Fwikidata%2FF7JXq3%0A%23%20see%20https%3A%2F%2Fgithub.com%2Fad-freiburg%2Fqlever%2Fissues%2F604%0APREFIX%20wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20p%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2F%3E%0APREFIX%20psn%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fstatement%2Fvalue-normalized%2F%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fmountain%20%3Fmountain_label%20(MAX(%3FelevationValues)%20AS%20%3Felevation)%20(SAMPLE(%3FcoordinateValues)%20AS%20%3Fcoordinates)%20WHERE%20%7B%0A%20%20%3Fmountain%20wdt%3AP31%20wd%3AQ8502%20.%0A%20%20%3Fmountain%20p%3AP2044%2Fpsn%3AP2044%2Fwikibase%3AquantityAmount%20%3FelevationValues%20.%0A%20%20%3Fmountain%20wdt%3AP625%20%3FcoordinateValues%20.%0A%20%20%3Fmountain%20rdfs%3Alabel%20%3Fmountain_label%20.%0A%20%20FILTER(%3FelevationValues%20%3E%3D%208000.0)%20.%0A%20%20FILTER%20(LANG(%3Fmountain_label)%20%3D%20%22en%22)%0A%7D%0AGROUP%20BY%20%3Fmountain%20%3Fmountain_label%0AORDER%20BY%20DESC(%3Felevation)&cmd=clearcache&send=100 [script.js:157:13](http://qlever.bitplan.com/script.js)
XHRGEThttp://qlever.bitplan.com/?query=# Mountains higher than 8000 m # fixes: # https://qlever.cs.uni-freiburg.de/wikidata/F7JXq3 # see https://github.com/ad-freiburg/qlever/issues/604 PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?mountain ?mountain_label (MAX(?elevationValues) AS ?elevation) (SAMPLE(?coordinateValues) AS ?coordinates) WHERE { ?mountain wdt:P31 wd:Q8502 . ?mountain p:P2044/psn:P2044/wikibase:quantityAmount ?elevationValues . ?mountain wdt:P625 ?coordinateValues . ?mountain rdfs:label ?mountain_label . FILTER(?elevationValues >= 8000.0) . FILTER (LANG(?mountain_label) = "en") } GROUP BY ?mountain ?mountain_label ORDER BY DESC(?elevation)&cmd=clearcache&send=100
[[HTTP/1.1 400 Bad Request 15ms]]()

@hannahbast
Copy link
Member

You can now use the QLever UI maximally easily as follows:

docker run -p 7000:7000 adfreiburg/qlever-ui

The QLever UI will then be available on port 7000, assuming that there is a QLever backend on port 7001.

@WolfgangFahl
Copy link
Author

WolfgangFahl commented Feb 26, 2022

@hannahbast - thank you that docker command works but i get the same getJson error
grafik
and
grafik

@WolfgangFahl
Copy link
Author

The port 7001 is available and shows:
grafik

@WolfgangFahl
Copy link
Author

WolfgangFahl commented May 21, 2022

Another try today and still:
grafik
This time the examples work so it's a result of the query and it looks like the error message needs improvement

@WolfgangFahl
Copy link
Author

WolfgangFahl commented May 21, 2022

SELECT ?c (COUNT(?c) AS ?count)
WHERE {
  ?subject a ?c
}
GROUP BY ?c
HAVING (?count >100)
ORDER BY DESC(?count)

see also https://qlever.cs.uni-freiburg.de/dblp/K3XtPb

@hannahbast
Copy link
Member

@WolfgangFahl QLever still does not support "a", just type the equivalent "rdf:type".

@Qup42 is currently working on a proper SPARQL parser, so "a" should work soon.

@joka921
Copy link
Member

joka921 commented May 21, 2022

@WolfgangFahl

  1. As already stated, you should use the "official" QLever UI, and we should maybe throw this really old rudimentary page out.
  2. The latest version of the QLeverUI properly propagates the error messages for 4xx and 5xx return codes: https://qlever.cs.uni-freiburg.de/wikidata/35s0Qj
  3. The issue of the a is already being adressed by implementing a proper SPARQL parser.

Can you confirm that point 2 works for you (proper error messages with the current version of the "official" QLeverUI, then we can close this here.

@Qup42
Copy link
Member

Qup42 commented May 21, 2022

  1. The issue of the a is already being adressed by implementing a proper SPARQL parser.

Point 3 has also been fixed with #669

@hannahbast
Copy link
Member

Awesome @Qup42 thanks!

@hannahbast
Copy link
Member

Looks solved to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants