alexa / alexa-skills-kit-sdk-for-python

The Alexa Skills Kit SDK for Python helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
https://developer.amazon.com/en-US/docs/alexa/alexa-skills-kit-sdk-for-python/overview.html
Apache License 2.0
809 stars 204 forks source link

SDK Skills are not working #25

Closed umairkhan10 closed 6 years ago

umairkhan10 commented 6 years ago

I've set up an SDK as explained in Technical documentation in SETTING UP ASK SDK on the below link. All SDK folders have been installed.

https://alexa-skills-kit-python-sdk.readthedocs.io/en/latest/GETTING_STARTED.html

After that, I've followed step-by-step guide that are mentioned in DEVELOPING YOUR FIRST SKILL on below link and implemented Hello World using handler classes.

https://alexa-skills-kit-python-sdk.readthedocs.io/en/latest/DEVELOPING_YOUR_FIRST_SKILL.html

Created .zip file of all the folders that are installed in SDK with helloworld.py folder in it and uploaded in console and also tried adding my helloworld.py file in asd_sdk folder and uploaded it in .zip but it's not working. When I test my lambda function it gives me below error.

{ "errorMessage": "Handler 'lambda_handler' missing on module 'hello_world'" }

Handler 'lambda_handler' missing on module 'hello_world': 'module' object has no attribute 'lambda_handler'

I tried renaming the file helloworld to lambda_function but still it's not picking lambda handler function from hello_world.py. Tried both Python 2.7 and 3.6.

nikhilym commented 6 years ago

Hey @umairkhan10 , did you change the handler name on Lambda as mentioned in this section?

Typically, since you created the handler name as handler, you need to mention it as hello_world.handler in the lambda console.

umairkhan10 commented 6 years ago

Thanks a lot. It worked :)

sarang-rk commented 6 years ago

Can you all please help me. I am done with all the step mentioned. But I am not able to understand which folders are required inside "skill.zip" I tried with in-line editor and uploaded only that but it is also failing. Please let me know the solution. Thanks in advance. Do I have to upload all the 34 folders which are present in ask-sdk folder and create a folder 'hello_world' and place hello_world.py insider the newly created folder and zip all to skill.zip and upload whole bunch?

nikhilym commented 6 years ago

@umairkhan10 awesome!! @sarang-rk please update your issue #26 with the issue template so that we can investigate your problem