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

Surveyor not responding and JS errors: NaN #2

Open
jmvanel opened this issue Oct 29, 2017 · 7 comments
Open

Surveyor not responding and JS errors: NaN #2

jmvanel opened this issue Oct 29, 2017 · 7 comments

Comments

@jmvanel
Copy link

jmvanel commented Oct 29, 2017

I think there is enough information to FIX in the console output;
otherwise I'll provide info on the (localhost) repo.
This was on Firefox 56.0 (64 bits) (on Ubuntu).

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?label 
 WHERE { 
 ?uri rdfs:label ?label . 
 FILTER (?uri IN ( <http://purl.org/dc/dcam/VocabularyEncodingScheme>,<http://purl.org/dc/terms/Agent>,<http://www.w3.org/2002/07/owl#Individual>,<http://www.w3.org/2001/XMLSchema#boolean>,<http://www.wikidata.org/entity/Q486972>,<http://purl.org/vocommons/voaf#Vocabulary>,<http://dbpedia.org/ontology/Location>,<http://www.w3.org/2000/10/swap/pim/contact#_SubjectToChange>,<http://www.w3.org/ns/adms#SemanticAsset>,<http://www.w3.org/ns/adms#SemanticDistribution>,<http://raw.githubusercontent.com/jmvanel/semantic_forms/master/vocabulary/forms.owl.ttl#specification>,<http://umbel.org/umbel/rc/PopulatedPlace>,<http://dbpedia.org/class/yago/City108524735>,<http://dbpedia.org/class/yago/Region108630985>,<http://dbpedia.org/class/yago/Capital108518505>,<http://dbpedia.org/class/yago/GeographicalArea108574314>,<http://dbpedia.org/class/yago/WikicatArchaeologicalSitesInFrance>,<http://dbpedia.org/class/yago/PhysicalEntity100001930>,<http://dbpedia.org/class/yago/Seat108647945>,<http://dbpedia.org/class/yago/YagoGeoEntity>,<http://dbpedia.org/class/yago/AdministrativeDistrict108491826>,<http://umbel.org/umbel/rc/Location_Underspecified>,<http://dbpedia.org/class/yago/Location100027167>,<http://dbpedia.org/class/yago/WikicatWorldHeritageSitesInFrance>,<http://dbpedia.org/class/yago/WikicatCapitals>,<http://dbpedia.org/class/yago/Site108651247>,<http://dbpedia.org/class/yago/WikicatCapitalsInEurope>,<http://dbpedia.org/class/yago/Center108523483>,<http://dbpedia.org/class/yago/YagoLegalActorGeo>,<http://dbpedia.org/class/yago/Prefecture108626947>,<http://dbpedia.org/class/yago/Commune108541609>,<http://dbpedia.org/class/yago/Object100002684>,<http://dbpedia.org/class/yago/YagoPermanentlyLocatedEntity>,<http://dbpedia.org/class/yago/Municipality108626283>,<http://dbpedia.org/class/yago/Tract108673395>,<http://dbpedia.org/class/yago/WikicatCitiesWithMillionsOfInhabitants>,<http://dbpedia.org/class/yago/Area108497294>,<http://dbpedia.org/class/yago/WikicatCitiesInFrance>,<http://dbpedia.org/class/yago/District108552138>,<http://dbpedia.org/class/yago/WikicatPrefecturesInFrance>,<http://dbpedia.org/class/yago/UrbanArea108675967>,<http://www.geonames.org/ontology#Feature>,<http://purl.org/spar/fabio/ResearchPaper>,<>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Person>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Organisation>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#InProceedings>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Track>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Conference>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Proceedings> )) }  query_interface.js:74:3
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?label 
 WHERE { 
 ?uri rdfs:label ?label . 
 FILTER (?uri IN ( <https://w3id.org/scholarlydata/ontology/conference-ontology.owl#AcademicEvent> )) }  query_interface.js:74:3
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?comment 
 WHERE { 
 ?uri rdfs:comment ?comment . 
 FILTER (?uri IN ( <http://purl.org/dc/dcam/VocabularyEncodingScheme>,<http://purl.org/dc/terms/Agent>,<http://www.w3.org/2002/07/owl#Individual>,<http://www.w3.org/2001/XMLSchema#boolean>,<http://www.wikidata.org/entity/Q486972>,<http://purl.org/vocommons/voaf#Vocabulary>,<http://dbpedia.org/ontology/Location>,<http://www.w3.org/2000/10/swap/pim/contact#_SubjectToChange>,<http://www.w3.org/ns/adms#SemanticAsset>,<http://www.w3.org/ns/adms#SemanticDistribution>,<http://raw.githubusercontent.com/jmvanel/semantic_forms/master/vocabulary/forms.owl.ttl#specification>,<http://umbel.org/umbel/rc/PopulatedPlace>,<http://dbpedia.org/class/yago/City108524735>,<http://dbpedia.org/class/yago/Region108630985>,<http://dbpedia.org/class/yago/Capital108518505>,<http://dbpedia.org/class/yago/GeographicalArea108574314>,<http://dbpedia.org/class/yago/WikicatArchaeologicalSitesInFrance>,<http://dbpedia.org/class/yago/PhysicalEntity100001930>,<http://dbpedia.org/class/yago/Seat108647945>,<http://dbpedia.org/class/yago/YagoGeoEntity>,<http://dbpedia.org/class/yago/AdministrativeDistrict108491826>,<http://umbel.org/umbel/rc/Location_Underspecified>,<http://dbpedia.org/class/yago/Location100027167>,<http://dbpedia.org/class/yago/WikicatWorldHeritageSitesInFrance>,<http://dbpedia.org/class/yago/WikicatCapitals>,<http://dbpedia.org/class/yago/Site108651247>,<http://dbpedia.org/class/yago/WikicatCapitalsInEurope>,<http://dbpedia.org/class/yago/Center108523483>,<http://dbpedia.org/class/yago/YagoLegalActorGeo>,<http://dbpedia.org/class/yago/Prefecture108626947>,<http://dbpedia.org/class/yago/Commune108541609>,<http://dbpedia.org/class/yago/Object100002684>,<http://dbpedia.org/class/yago/YagoPermanentlyLocatedEntity>,<http://dbpedia.org/class/yago/Municipality108626283>,<http://dbpedia.org/class/yago/Tract108673395>,<http://dbpedia.org/class/yago/WikicatCitiesWithMillionsOfInhabitants>,<http://dbpedia.org/class/yago/Area108497294>,<http://dbpedia.org/class/yago/WikicatCitiesInFrance>,<http://dbpedia.org/class/yago/District108552138>,<http://dbpedia.org/class/yago/WikicatPrefecturesInFrance>,<http://dbpedia.org/class/yago/UrbanArea108675967>,<http://www.geonames.org/ontology#Feature>,<http://purl.org/spar/fabio/ResearchPaper>,<>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Person>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Organisation>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#InProceedings>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Track>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Conference>,<https://w3id.org/scholarlydata/ontology/conference-ontology.owl#Proceedings> )) }  query_interface.js:74:3
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?comment 
 WHERE { 
 ?uri rdfs:comment ?comment . 
 FILTER (?uri IN ( <https://w3id.org/scholarlydata/ontology/conference-ontology.owl#AcademicEvent> )) }  query_interface.js:74:3
SAVING REPOS  main.js:270:3
Size of the repos: 56517B - Compressed: 7705B - Compression rate: 86.36693384291452%  main.js:275:3
GET http://tools.sirius-labs.no/rdfsurveyor/css/rdfsurveyor.css [HTTP/1.1 304 Not Modified 825 ms]
GET http://tools.sirius-labs.no/rdfsurveyor/css/bootstrap.min.css [HTTP/1.1 304 Not Modified 92 ms]
Valeur NaN inattendue lors de l’analyse de l’attribut y1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut y2.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut x1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut x2.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut y1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut y2.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut x1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut x2.  markup.js:335:6
GET http://tools.sirius-labs.no/rdfsurveyor/css/bootstrap.min.css.map [HTTP/1.1 404 Not Found 88 ms]
Valeur NaN inattendue lors de l’analyse de l’attribut y1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut y2.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut x1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut x2.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut y1.  markup.js:335:6
Valeur NaN inattendue lors de l’analyse de l’attribut y2.  markup.js:335:6

`

@guiveg
Copy link
Owner

guiveg commented Oct 29, 2017

I'm checking the logs and trying to reproduce myself the errors.

From your output, I can see that everything is going well, except that "bootstrap.min.css.map" file is not found. I'm not sure why this file is requested (not needed in my tests), but I can upload it to the server.

When querying your endpoint, http://semantic-forms.cc:9112/sparql2, I've observed a problem with one of your classes that has an empty URI. Due to this, the function that extracts the namespaces breaks. I can fix this problem in the code, but you should also check your data. Please test the answers to the culprit SPARQL query and you'll find an empty URI value:

http://semantic-forms.cc:9112/sparql2?query=PREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20DISTINCT%20%3Fclass%20%0A%20WHERE%20%7B%20%0A%20%5B%5D%20a%20%3Fclass%20.%20%0A%20filter%20not%20exists%20%7B%20%0A%20%20%20%3Fclass%20rdfs%3AsubClassOf%20%3Fsuper%20.%20%0A%20%20%20filter%20(%20%3Fsuper%20!%3D%20%3Fclass%20)%20%0A%20%7D%20%0A%20filter%20not%20exists%20%7B%20%0A%20%20%20%3Fsub%20rdfs%3AsubClassOf%20%3Fclass%20.%20%0A%20%20%20filter%20(%20%3Fsub%20!%3D%20%3Fclass%20)%20%0A%20%7D%20%0A%20%7D&format=json&Accept=application%2Fsparql-results%2Bjson

@jmvanel
Copy link
Author

jmvanel commented Oct 29, 2017

OK, thanks for the diagnostic;
I'm aware that empty URI exist, due to a (fixed) bug.

I'll remove them with simple SPARQL update,
and let you know when ti's done.

Regarding
bootstrap.min.css.map
this is a classical issue: the .map files are not needed in normal processing;
but the console or JS debugger will try to read them, to provide source with the original line formatting in relation with the line numbers.
See this about .map files https://en.wikipedia.org/wiki/MAP_(file_format)

@jmvanel
Copy link
Author

jmvanel commented Oct 29, 2017

I removed the URI's <> in subject and object positions in my repo.

Now it goes further: 78 queries ! 👍
http://tools.sirius-labs.no/rdfsurveyor/?repo=http%3A%2F%2Fsemantic-forms.cc%3A9112%2Fsparql2

But there is another error in the JS console: here is the end of the log:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?label 
 WHERE { 
 ?uri rdfs:label ?label . 
 FILTER (?uri IN ( <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Place> )) }
query_interface.js:74 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?comment 
 WHERE { 
 ?uri rdfs:comment ?comment . 
 FILTER (?uri IN ( <http://www.w3.org/2000/01/rdf-schema#Resource>,<http://purl.org/dc/terms/MediaTypeOrExtent>,<http://purl.org/dc/terms/RightsStatement>,<http://purl.org/dc/terms/LocationPeriodOrJurisdiction>,<http://www.w3.org/2002/07/owl#Thing>,<http://xmlns.com/foaf/0.1/Document>,<http://xmlns.com/foaf/0.1/Project>,<http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing>,<http://www.w3.org/ns/ldp#Resource>,<http://www.w3.org/ns/auth/acl#Access>,<http://www.w3.org/2006/gen/ont#InformationResource>,<http://www.w3.org/ns/auth/cert#Key>,<http://usefulinc.com/ns/doap#Repository>,<http://rdfs.org/sioc/ns#Container>,<http://xmlns.com/wordnet/1.6/Project>,<http://rdfs.org/sioc/ns#Space>,<http://rdfs.org/sioc/ns#Item>,<http://www.w3.org/2001/XMLSchema#string>,<http://www.w3.org/2001/XMLSchema#float>,<http://purl.org/dc/dcmitype/Dataset>,<http://www.w3.org/2001/XMLSchema#integer>,<http://www.w3.org/ns/dcat#Distribution>,<http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#SocialPerson>,<http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Situation>,<http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Event>,<http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson>,<http://www.w3.org/2000/10/swap/pim/contact#Phone>,<http://www.w3.org/2000/10/swap/pim/contact#SocialEntity>,<http://purl.org/NET/scovo#Item>,<http://purl.org/NET/scovo#Dimension>,<http://purl.org/NET/c4dm/event.owl#Event>,<http://purl.org/stuff/rev#Review>,<http://www.w3.org/2004/02/skos/core#Collection>,<http://www.w3.org/2006/vcard/ns#RelatedType>,<http://www.w3.org/2006/vcard/ns#TelephoneType>,<http://www.w3.org/2006/vcard/ns#Gender>,<http://www.w3.org/2006/vcard/ns#Kind>,<http://www.w3.org/2006/vcard/ns#Type>,<http://deductions.github.io/biological-collections.owl.ttl#Acquisition>,<http://www.w3.org/2006/gen/ont#timeSpecificResource>,<http://www.w3.org/2006/gen/ont#contentTypeSpecificResource>,<http://virtual-assembly.org/pair_v2#HUBJECT>,<http://www.w3.org/ns/prov#Activity>,<http://schema.org/Thing>,<http://www.w3.org/2008/05/skos#Collection>,<http://www.w3.org/2006/time#TemporalDuration>,<http://raw.githubusercontent.com/jmvanel/semantic_forms/master/vocabulary/forms.owl.ttl#TripleEdit>,<http://www.w3.org/2001/XMLSchema#long>,<http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Object>,<http://www.ontologydesignpatterns.org/ont/d0.owl#Topic> )) }
query_interface.js:74 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?uri ?comment 
 WHERE { 
 ?uri rdfs:comment ?comment . 
 FILTER (?uri IN ( <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Place> )) }
main.js:270 SAVING REPOS
main.js:275 Size of the repos: 113992B - Compressed: 12980B - Compression rate: 88.61323601656257%
repo.js:751 Uncaught TypeError: Cannot read property 'startsWith' of undefined
    at repo.js:751
    at Function.m.findKey (underscore-min.js:5)
    at repo.js:751
    at Function.m.each.m.forEach (underscore-min.js:5)
    at processNamespaces (repo.js:749)
    at repo.js:270
    at classes.js:374
    at Object.<anonymous> (query_interface.js:42)
    at i (jquery-3.2.0.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-3.2.0.min.js:2)

@guiveg
Copy link
Owner

guiveg commented Oct 29, 2017

Hey, it's again the same problem with an empty URI. I'll include a check to discard those URIs and request a server update in our test website (http://tools.sirius-labs.no/rdfsurveyor/).

@jmvanel
Copy link
Author

jmvanel commented Oct 29, 2017

That will be nice;
however, I checked in my database the 3 possibilities for a triple to have the <> URI :

SELECT * WHERE { GRAPH ?G { <> ?P ?O . } }
SELECT * WHERE { GRAPH ?G { ?S ?P <> . } }
SELECT * WHERE { GRAPH ?G { ?S <> ?O . } }

nothing is returned.
I have the feeling that the surveyor problem is not "an empty URI" this time.

I checked my database on the original SPARQL service, that exposes the named graphs, e.g;
http://semantic-forms.cc:9112/select-ui?query=SELECT+*+WHERE+%7B+GRAPH+%3FG+%7B+%3C%3E+%3FP+%3FO+.+%7D+%7D
or:

http://semantic-forms.cc:9112/sparql?query=SELECT * WHERE { GRAPH ?G { <> ?P ?O . }}

And also with the new derived SPARQL service (the one you use), that does not expose the named graphs:

http://semantic-forms.cc:9112/sparql2?query=SELECT * WHERE { <> ?P ?O . }
http://semantic-forms.cc:9112/sparql2?query=SELECT * WHERE { ?S ?P <>  . }
http://semantic-forms.cc:9112/sparql2?query=SELECT * WHERE { ?S <> ?O . }

@guiveg
Copy link
Owner

guiveg commented Oct 29, 2017

The problem is that a couple of classes don't have proper URIs, e.g. doapFiles, so the function that extracts the namespaces returns undefined, firing an error when calling startsWith (see your log above).

I've made a quick fix and I'll update the code at github. I hope this fix will be made available soon in the test website.

Thanks for your support!

@jmvanel
Copy link
Author

jmvanel commented Oct 29, 2017

OK, I get it , <doapFiles> is indeed present, and is not an absolute URI, which should not be in a database !
I'll also make a SPARQL Update for these.

Note that later I plan to implement a sanity check in SF:
jmvanel/semantic_forms#152

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

2 participants