Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

Marta y Víctor avatar image
Marta y Víctor asked

Now long progressive responses give error

When I first published my skill in september I could use progressive responses with long text to give some information to the customers before the final answer. This summer something has change in the behaviour of progressive responses as tryting to provide long progressive responses (> about 1500-2000 chars) doesn´t work anymore as it always says "Directive not valid":

[ERROR] 2023-10-14T15:19:35.968Z c27512de-0d3c-4e45-babd-79d772b66491 Directive not valid.

Traceback (most recent call last):

File "/var/task/ask_sdk_runtime/dispatch.py", line 118, in dispatch

output = self.__dispatch_request(handler_input) # type: Union[Output, None]

File "/var/task/ask_sdk_runtime/dispatch.py", line 182, in __dispatch_request

output = supported_handler_adapter.execute(

File "/var/task/ask_sdk_runtime/dispatch_components/request_components.py", line 437, in execute

return handler.handle(handler_input)

File "/var/task/inteligencia.py", line 322, in handle

get_progressive_response(handler_input, delta)

File "/var/task/inteligencia.py", line 854, in get_progressive_response

directive_service_client.enqueue(directive_request)

File "/var/task/ask_sdk_model/services/directive/directive_service_client.py", line 107, in enqueue

api_response = self.invoke(

File "/var/task/ask_sdk_model/services/base_service_client.py", line 151, in invoke

raise ServiceException(message=exception_metadata.message,

ask_sdk_model.services.service_exception.ServiceException: Directive not valid.

The is no documented limit in the lenght of a progressive response so I don´t really understand why it stopped working what worked ok previously. I use python to develop.

skillprogressiveresponse
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Whitworth avatar image
Andy Whitworth answered

The Amazon documentation for Progressive Responses states that the directive.speech text within the <speak> tags must be no longer than 600 characters.

https://developer.amazon.com/en-US/docs/alexa/custom-skills/send-the-user-a-progressive-response.html#request-body

So, 1500+ chars obviously exceeds that. Perhaps this is a new limit or just wasn't being enforced previously.


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Marta y Víctor avatar image
Marta y Víctor answered

Thank you very much for your answer. I had studied the documentation for hours and didn´t notice that detail of the 600 chars. I would really say it is something new (or they where not enforcing it as you say). But with that clue I can perfectly adapt my source code to comply with that. Thank you!!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.