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

Cannot import the SpokenInfo class (ask_sdk_model.services.reminder_management) #186

Closed dooinwell closed 3 years ago

dooinwell commented 3 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

Based on documentation, I expect to be able to import the SpokenInfo class by doing

from ask_sdk_model.services.reminder_management import SpokenInfo

Current Behavior

The import fails with the following error: ImportError: cannot import name 'SpokenInfo' from 'ask_sdk_model.services.reminder_management'

I also tried many variations with no luck.

Your Environment

ask-sdk-core==1.15.0 ask-sdk-model==1.29.0 Python 3.7 (Google App Engine)

nikhilym commented 3 years ago

Hey @dooinwell , the SpokenInfo class is actually named as AlertInfoSpokenInfo, as can be seen here. This is because the models are autogenerated and there seems to be an issue with that class definition leading to that.

Can you please try importing the AlertInfoSpokenInfo module for your needs, and let us know if you still face issues?

dooinwell commented 3 years ago

Thank you - works perfectly with this import.

On Mon, Mar 1, 2021 at 11:03 PM Nikhil Yogendra Murali < notifications@github.com> wrote:

Hey @dooinwell https://github.com/dooinwell , the SpokenInfo class is actually named as AlertInfoSpokenInfo, as can be seen here https://github.com/alexa/alexa-apis-for-python/blob/master/ask-sdk-model/ask_sdk_model/services/reminder_management/__init__.py#L30. This is because the models are autogenerated and there seems to be an issue with that class definition leading to that.

Can you please try importing the AlertInfoSpokenInfo module for your needs, and let us know if you still face issues?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexa/alexa-skills-kit-sdk-for-python/issues/186#issuecomment-788331347, or unsubscribe https://github.com/notifications/unsubscribe-auth/APLLA5ORLNUTDG6BE5N6WV3TBQFKPANCNFSM4YLQH5HQ .