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
812 stars 206 forks source link

"Unable to import module 'lambda_function': No module named 'ask_sdk_core' #163

Closed Daniyaldehleh closed 4 years ago

Daniyaldehleh commented 4 years ago

Expected Behavior

To run smoothly

Current Libs in venv & lambda's layer

python\lib\python3.7\site-packages>


ask-sdk                              1.14.0
ask-sdk-core                         1.14.0
ask-sdk-dynamodb-persistence-adapter 1.14.0
ask-sdk-model                        1.24.0
ask-sdk-runtime                      1.14.0

Possible Solution

Not sure

Steps to Reproduce (for bugs)

from ask_sdk_core.handler_input import HandlerInput
from ask_sdk_core.api_client import DefaultApiClient
from ask_sdk_core.skill_builder import CustomSkillBuilder
from ask_sdk_core.handler_input import HandlerInput
from ask_sdk_model.services import ServiceException

Context

I am trying to use the ask_sdk_core libs in Lambda's layer

Ask-sdk = 1.14.00

Python version info

Python 3.7

Shreyas-vgr commented 4 years ago

Hi @danieldhz, based on the information you've provided, I believe your lambda layer isn't configured correctly resulting in import errors. Did you try creating a zip of ask-sdk libraries under a python/ dir as mentioned in the docs here and upload it as a lambda layer?

Also please refer to this article on steps for setting up lambda layer on AWS console, might help resolve your issue.

Daniyaldehleh commented 4 years ago

@Shreyas-vgr Yeah I realized in the path the py versions conflicted with each other. Thanks!