Validate template syntax of canonical forms for uploaded devices
gcampax opened this issue · 0 comments
gcampax commented
Otherwise, an erroneous device can break updating the dataset for everyone, with an error like:
Dataset cleaned
GenieTypeError: Failed to parse template string for constant_Entity__tt__device = REDACTED (): Expected "$", "${", "{", end of input, or word but "[" found.
at SentenceGenerator.addRule (/opt/almond-cloud/node_modules/genie-toolkit/dist/lib/sentence-generator/generator.js:449:23)
at ThingpediaLoader._addRule (/opt/almond-cloud/node_modules/genie-toolkit/languages-dist/thingtalk/load-thingpedia.js:157:23)
at ThingpediaLoader._loadDevice (/opt/almond-cloud/node_modules/genie-toolkit/languages-dist/thingtalk/load-thingpedia.js:951:18)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ThingpediaLoader._loadMetadata (/opt/almond-cloud/node_modules/genie-toolkit/languages-dist/thingtalk/load-thingpedia.js:1085:13)
at async ThingpediaLoader.init (/opt/almond-cloud/node_modules/genie-toolkit/languages-dist/thingtalk/load-thingpedia.js:128:9)
at async default_1 (/opt/almond-cloud/node_modules/genie-toolkit/languages-dist/thingtalk/en/basic.genie.js:50:5)
at async SentenceGenerator.initialize (/opt/almond-cloud/node_modules/genie-toolkit/dist/lib/sentence-generator/generator.js:356:13)