question

Pedro avatar image
Pedro asked

LaunchRequestHandler is not called when default language is Portuguese (Brazil)

Hi guys,


I created two skills pulling the sample "Hello World". One of them has English as default language, the other one has Portuguese (Brazil), and that is the only difference between them. Everything else is 100% equal, and apart from the skill name, I didn't make any changes at all from the sample project "Hello World".


So I have these two skills, both called "escolha um", and in the ```test``` section of the console i type in:


``` Enlish(US): Open escolha um```

``` Portugese (Brazil): Abrir escolha um```

The Enligsh versoin sends the JSON correctly and calls the ```LaunchRequest``` request, but the Portuguese one doesn't do anything, the JSON block isn't even filled, and Alexa never responds, Literally nothing happens.


Worth mentioning that "abrir" means "Open" in Portuguese, so it is a valid launch phrase. I've tried the english launch phrase as well but it also didn't do anything.


Does anyone know what I can do? Is there any specific change that I must make on the Portuguese version (besides on the very creation of the skill) to let it know that it should use Portuguese launch phrases?


Thanks!

launch-wordportuguese
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pedro avatar image Pedro commented ·

[EDIT] Both skills are in Python. Also, I enabled logging, and this is the JSON request sent by the skill on portuguese:

Directive: SpeechRecognizer.RequestProcessingCompleted 
{    
  "header": {        
     "namespace": "SpeechRecognizer",        
     "name": "RequestProcessingCompleted",     
     "messageId": "324da9fe-5301-429e-b52e-eb152b4bd773", 
     "dialogRequestId": "12d6ecea-b3bc-433d-a4a7-1975cccac1c7" 
  },
  "payload": {} 
}

The payload is empty. I checked the same in the English version and the payload attribute is huge, with a lot of details and etc... but I don't understand why this is happening, how come that the portuguese version cannot fill the payload by itself?

Thanks!

0 Likes 0 ·

1 Answer

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Hello @Pedro and thank you for your message.

Can you please share your skill ID so I can look further into this issue?

Regards,
Barry

4 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pedro avatar image Pedro commented ·

off course!


<code>
Portuguese not working -> amzn1.ask.skill.2b56b8cc-c5fb-48c0-8a96-8490098a76dd

English fully working -> amzn1.ask.skill.47051933-0cee-44da-80e3-00542ee64126

</code>

0 Likes 0 ·
Amazon_Bernardo Bezerra avatar image Amazon_Bernardo Bezerra Pedro commented ·

Hi @Pedro and thank you for the additional information.

Looking at the CloudWatch logs for your skill, it is possible to see the following error message:

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function':
No module named 'alexa'

Please make sure that you have correctly imported all the modules needed for your code to execute correctly.

A few more comments: I noticed that you are using Portuguese words for your English's skill interaction model. This is not recommended as Alexa will have difficulties recognising Portuguese while set to an English language model. Additionally, if both your skills will have the same functionality in the end, I would suggest you develop only one skill and just create an additional language model to it, as it will make it easier to maintain it.

Regards,
Barry

0 Likes 0 ·
Pedro avatar image Pedro Amazon_Bernardo Bezerra commented ·

That error was happening because I tried copping the code from <a href="https://github.com/alexa/skill-sample-python-helloworld-classes/blob/master/lambda/py/hello_world.py" alexa/skill-sample-python-helloworld-classes </a> as last hope, but bro I swear both codes were identical before hahah. but yes, I deleted the whole code of the portuguese version and then copied the code from the english version, and now it simply started working like a charm...


Something must have happened "behind the scenes" :D

And about having the two skills, that was only for test purposes. My idea is to have only the portuguese one, I only created the english to test when the first one was not responding. As it is working now, I've deleted the english version.


T

1 Like 1 ·
Show more comments