I am having some trouble finding out where the error is in this program. My Alexa application is running a python script via AWS Lambda. I have strictly been testing in the Amazon Developer Console "Test" tab. When I ask Alexa to open my app called "Lingo Dictionary", I get no problem. However when I get it to respond to one of my custom intents, it gives me an error. A sample Alexa conversation:
[U]ser: open lingo dictionary
[A]lexa: This is Lingo Dictionary... [Successful response]
U: lol
A: There was a problem with the requested skill's response [ERROR]
Another example:
U: ask lingo dictionary lol
A: There was a problem with the requested skill's response [ERROR]
I know that the word "lol" should be able to be processed by Alexa as under the "Build" tab when I go to the "Utterance Profiler", and I put in the command, it is able to match up the correct intent with the correct word.
When I get the errors in the test tab this is the following JSON input:
{
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.2fd96e27-9092-4424-b613-a7eae9794d3b",
"application": {
"applicationId": "amzn1.ask.skill.6bf5315a-56c9-460c-9090-70bfa1be331f"
},
"user": {
"userId": "amzn1.ask.account.SHORT"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.ask.skill.6bf5315a-56c9-460c-9090-70bfa1be331f"
},
"user": {
"userId": "amzn1.ask.account.SHORT"
},
"device": {
"deviceId": "amzn1.ask.device.SHORT",
"supportedInterfaces": {}
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": "SHORT"
},
"Viewport": {
"experiences": [
{
"arcMinuteWidth": 246,
"arcMinuteHeight": 144,
"canRotate": false,
"canResize": false
}
],
"shape": "RECTANGLE",
"pixelWidth": 1024,
"pixelHeight": 600,
"dpi": 160,
"currentPixelWidth": 1024,
"currentPixelHeight": 600,
"touch": [
"SINGLE"
]
}
},
"request": {
"type": "SessionEndedRequest",
"requestId": "amzn1.echo-api.request.1ec45382-20fb-4fb5-80cd-536f096e5923",
"timestamp": "2019-03-08T21:13:57Z",
"locale": "en-US",
"reason": "ERROR",
"error": {
"type": "INVALID_RESPONSE",
"message": "An exception occurred while dispatching the request to the skill."
}
}
}
When I put this JSON directly into Lambda, I get that my script simply returns null. With no errors present. Then I decided to try and take into account when the request is an error, and now my skill responds to errors. However it is still not working as expected. I am not sure why this would be the JSON that my script should be getting. It should have the intent name, etc, but it is all missing.
How can I go about solving this issue?