You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm working through your excellent book-in-progress, Building Voice-Enabled Apps with Alexa, and I encountered a strange error when working through the 'dragonhunt' skill in Chapter 2. When I went to run it with node index, I got this unhelpful error back in the terminal window:
After digging around a bit, I discovered I had named my skill dragon_hunt, with an underscore, and this had caused the regular expression in use in ChatSkillsManager#session to fail to match the input. The regex is defined thus: new RegExp(this.id + '[,\\-\\!\\? ]+ask ([a-zA-Z0-9]+)[,\\. ](.*)', 'i').
So, is the exclusion of non-alphanumerics from skill name intentional, or just accidental? If it's intentional, or seems like a good idea, then I could submit a pull request to check skill names at the beginning of execution against that requirement and throw an error if the skill name isn't going to fly. Otherwise, I could submit a PR expanding the characters allowed in the regex and probably also checking against that, since there will be some characters we don't want in the skill name. Either way, I'd be happy to contribute to your very helpful project.
The text was updated successfully, but these errors were encountered:
For invocation names, Amazon states: "The invocation name must contain only lower-case alphabetic characters, spaces between words, possessive apostrophes, or periods used in abbreviations."
I guess this doesn't map one-for-one with the name you give your skill within the code, but it's something to consider as well. :)
The Invocation Name requirements is good information to have. I hadn't even thought about the distinction between namespace and invocation name. It's fun to dig into something relatively new, like Alexa.
I will put together a PR for screening the namespace for characters that don't match the regex. Thanks again for the library and the book.
Hello, I'm working through your excellent book-in-progress, Building Voice-Enabled Apps with Alexa, and I encountered a strange error when working through the 'dragonhunt' skill in Chapter 2. When I went to run it with
node index
, I got this unhelpful error back in the terminal window:That's JavaScript for you, right?
After digging around a bit, I discovered I had named my skill
dragon_hunt
, with an underscore, and this had caused the regular expression in use inChatSkillsManager#session
to fail to match the input. The regex is defined thus:new RegExp(this.id + '[,\\-\\!\\? ]+ask ([a-zA-Z0-9]+)[,\\. ](.*)', 'i')
.So, is the exclusion of non-alphanumerics from skill name intentional, or just accidental? If it's intentional, or seems like a good idea, then I could submit a pull request to check skill names at the beginning of execution against that requirement and throw an error if the skill name isn't going to fly. Otherwise, I could submit a PR expanding the characters allowed in the regex and probably also checking against that, since there will be some characters we don't want in the skill name. Either way, I'd be happy to contribute to your very helpful project.
The text was updated successfully, but these errors were encountered: