python - Alexa has trouble accessing my skill -


cross-posted on amazon developer forums

when developing 1 of skills, noticed in service simulator, invoking skill intent welcome — should dispatch get_welcome_response() function — fails unless thinks not new session. reflected when testing actual echo device when invoke skill without specific intent — again, should default get_welcome_response() function — , alexa telling me having trouble accessing particular skill. here get_welcome_response() function skill looks like:

def get_welcome_response():  session_attributes = {} card_title = "welcome" speech_output = "welcome bravo lima." \         "please state username , password" # if user either not reply welcome message or says # not understood, prompted again text. reprompt_text = "unable authenticate." \         "please repeat username , password" should_end_session = false return build_response(session_attributes, build_speechlet_response(     card_title, speech_output, reprompt_text, should_end_session)) 

however, since whole of skill quite complicated, wrote new 1 simple try , see if invoke skill. skill has 1 function, get_welcome_response():

def get_welcome_response():  session_attributes = {} card_title = "welcome" speech_output = "hello. " \                 "good morning, " \                 "is coffee in nebula?" should_end_session = true return build_response(session_attributes, build_speechlet_response(     card_title, speech_output, none, should_end_session)) 

if skill invoked without intent, goes here. i've defined intent test in service simulator, , works regardless or whether or not considers new session. alexa able recognize skill when invoked using echo , responds accordingly.

the way aws lambda server handles both more complicated skill working before , 1 barely different. 2 differences between either get_welcome_response() function, is:

  1. that former requires should_end_session = false because needs pass session_attributes variable around other functions various other intents in skill work properly.
  2. the latter has no reprompt text

both of these skills created using amazon's mycoloris template, functions @ beginning of code — lambda_handler, on_session_started, on_launch etc functions structurally same.

some added information rule out possible issues (and show isn't duplicated question):

  1. my echo registered same account developer account on aws
  2. i entered correct arn code endpoint in developer console each skill
  3. everything on lambda server side executes properly
  4. i have asked similar question related service simulator before, , know has/had severe bug: have worked around defining get_welcome_response() functions given intents first in code.
  5. i have followed guidelines when defining invocation names skills: english words, no proper nouns, 1-3 words, between 2-50 characters, etc

i have been trying rack brain around issue awhile — why alexa can register simpler skill not more complicated skill when there isn't substantial differentiates them 1 — , know issue lies somewhere in interaction model it's not obvious me lies. measure, here interaction model both skills:

for simple test skill:

intent schema:

{   "intents": [     {       "intent": "morning"    }   ] } 

associated utterance(s):

morning morning 

for more complicated skill:

intent schema:

   {          "intents": [              {              "intent": "welcome"              },            {              "intent": "validate",              "slots": [                {                  "name": "username",                  "type": "list_of_names"                },                {                  "name": "password",                  "type": "amazon.number"                }              ]            },            {               "intent": "report"            }          ]       } 

associated utterance(s):

welcome morning validate {username} , {password} report generate report 


Comments