Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report : Sending a voice forward consent start connection directive returns error "ask_sdk_core/response_helper.py directive.object_type has no attribute 'object_type'" #206

Open
elmaniouiSoulaimane opened this issue Apr 15, 2023 · 0 comments

Comments

@elmaniouiSoulaimane
Copy link

CONTEXT : In my alexa skill I want to implement the voice forward consent directive. But when I send a start connection directive with the list of permissions that I want the user to approve or deny, I receive an error that says :

ERROR MESSAGE :

File "/var/task/ask_sdk_core/response_helper.py", line 130, in add_directive
directive.object_type == "VideoApp.Launch"):
AttributeError: 'dict' object has no attribute 'object_type'

STEPS TO REPRODUCE : here's the response object with what I think is the proper directive format

start_connection_directive = {
            "type": "Connections.StartConnection",
            "uri": "connection://AMAZON.AskForPermissionsConsent/2",
            "input": { 
                '@type': 'AskForPermissionsConsentRequest', 
                '@version': '2', 
                'permissionScopes': [{ 
                    'permissionScope': 'alexa::profile:given_name:read', 
                    'consentLevel': 'PERSON'
                }]
             }
        }
    
    return (
                handler_input.response_builder
                    .add_directive(start_connection_directive)
                    .speak('i need your name')
                    .ask('speak_output')
                    .response
            )

** Environment :**

  • Operating System and version: I use amazon resources ( an amazon hosted skill )
@elmaniouiSoulaimane elmaniouiSoulaimane changed the title Bug report : Sending a voice forward consent start connection directive Bug report : Sending a voice forward consent start connection directive returns error "ask_sdk_core/response_helper.py directive.object_type has no attribute 'object_type'" Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant