HW-SWeL / ShEx-validator

ShEx-validator parses a ShEx schema and RDF data file and validates the resources in the data against the shapes in the schema
MIT License
3 stars 1 forks source link

Crash when handling updated HCLS ShEx #22

Closed beveradb closed 9 years ago

beveradb commented 9 years ago

Here is the ShEx: https://github.com/AlasdairGray/HCLSValidator/blob/master/hcls-validator.shex Here is the crash:

shex@shextool~/ShExValidataAndrew/node_modules/ShEx-validator $ node commandLine.js samples/hcls_alasdair_2015.shex samples/chembl_2014.ttl "http://rdf.ebi.ac.uk/chembl/chembl" Schema Parsed: 6 rules. Data Parsed: 66 triples.

/home/shex/ShExValidataAndrew/node_modules/ShEx-validator/node_modules/promise/node_modules/asap/asap.js:45 throw e; ^ TypeError: Cannot call method 'toString' of undefined at validatePoint (/home/shex/ShExValidataAndrew/node_modules/ShEx-validator/includes/Erics_RDF.js:3345:28) at closeShapes (/home/shex/ShExValidataAndrew/node_modules/ShEx-validator/includes/Erics_RDF.js:3380:28) at validate (/home/shex/ShExValidataAndrew/node_modules/ShEx-validator/includes/Erics_RDF.js:3412:28) at Object.validate (/home/shex/ShExValidataAndrew/node_modules/ShEx-validator/validator.js:21:33) at /home/shex/ShExValidataAndrew/node_modules/ShEx-validator/index.js:18:19 at /home/shex/ShExValidataAndrew/node_modules/ShEx-validator/node_modules/promise/lib/core.js:33:15 at flush (/home/shex/ShExValidataAndrew/node_modules/ShEx-validator/node_modules/promise/node_modules/asap/asap.js:27:13) at process._tickCallback (node.js:442:13) shex@shextool~/ShExValidataAndrew/node_modules/ShEx-validator $

tar672 commented 9 years ago

looking at now. where did the updated schema come from?

Doix commented 9 years ago

Alasdair wrote one. I need to find something else to claim as my contribution now.

tar672 commented 9 years ago

Haha, well english error messages? Have reproduced the crash.

tar672 commented 9 years ago

Schema has no starting rule. This is not supported yet. (admittedly this should give a schema parse error but theres not point implementing that because we're about to add support for providing a starting rule)