Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Save Translation edits throws an error in WebToVTTCaptions v2.0.0 #354

@flick1533

Description

@flick1533

Describe the bug

When I click on the Save edits button after editing the Translation, the workflow starts to rerun but ends with an Error status.

To Reproduce

1. Upload a video and run a workflow. The workflow I ran has the following configuration.
    Audio Operators - Transcribe - Source Language - English US
    Text Operators - Translate - Spanish
    Video is uploaded and analyzed well.
2. Edit the Tanslation for the workflow
3. Click Save edits
4. The workflow ends in an Error state. The Step Functions console shows the error is in WebToVTTCaptions.

Expected behavior

The workflow reruns with the edited translation.

Please complete the following information about the solution:

  • Version: 2.0.0

  • Region: [e.g. us-east-1]

  • Was the solution modified from the version published on this repository?

No

  • If the answer to the previous question was yes, are the changes available on GitHub?

  • Have you checked your service quotas for the services this solution uses?

Yes

  • Were there any errors in the CloudWatch Logs?

This is ValueError in step: Complete Stage TransformText

{
  "errorMessage": "Exception: 'Stage TransformText encountered and error during execution, aborting the workflow'",
  "errorType": "ValueError",
  "requestId": "9cf69725-b853-4ff8-9159-f9cd13f9dacd",
  "stackTrace": [
    "  File \"/var/task/app.py\", line 327, in complete_stage_execution_lambda\n    return complete_stage_execution(\"lambda\", event[\"Name\"], event[\"Status\"], event[\"Outputs\"], event[\"WorkflowExecutionId\"])\n",
    "  File \"/var/task/app.py\", line 467, in complete_stage_execution\n    raise ValueError(\n"
  ]
}

This is the error from the Execute WebToVTTCaptions (TransformText) - Caught twice in Execute WebToVTCaptions (TransformText)

{
  "Name": "WebToVTTCaptions",
  "AssetId": "1224dc3f-5e34-42cf-be48-1c4b0081bfed",
  "WorkflowExecutionId": "e416570c-bd06-4a56-8ba4-757732ab5ecb",
  "Input": {
    "Media": {
      "Video": {
        "S3Bucket": "clo-miestack-XXXXXXXXXXXX-dataplane-XXXXXXXXXXXX",
        "S3Key": "public/upload/Welcome to AWS, London.mp4"
      }
    },
    "MetaData": {}
  },
  "Configuration": {
    "MediaType": "MetadataOnly",
    "Enabled": true,
    "TargetLanguageCodes": [
      "es",
      "en"
    ]
  },
  "Status": "Started",
  "MetaData": {},
  "Media": {},
  "Outputs": {
    "Error": "MasExecutionError",
    "Cause": "{\"errorMessage\": \"{'Name': 'WebToVTTCaptions', 'AssetId': '1224dc3f-5e34-42cf-be48-1c4b0081bfed', 'WorkflowExecutionId': 'e416570c-bd06-4a56-8ba4-757732ab5ecb', 'Input': {'Media': {'Video': {'S3Bucket': 'clo-miestack-XXXXXXXXXXXXX-dataplane-XXXXXXXXXXXXX', 'S3Key': 'public/upload/Welcome to AWS, London.mp4'}}, 'MetaData': {}}, 'Configuration': {'MediaType': 'MetadataOnly', 'Enabled': True, 'TargetLanguageCodes': ['es', 'en']}, 'Status': 'Error', 'MetaData': {'WebCaptionsError': \\\"No valid inputs 'SourceLanguageCode'\\\"}, 'Media': {}}\", \"errorType\": \"MasExecutionError\", \"requestId\": \"37b7b2f0-e57a-4bc8-bdfd-c85857db4624\", \"stackTrace\": [\"  File \\\"/var/task/webcaptions.py\\\", line 589, in create_vtt\\n    webcaptions_object = WebCaptions(operator_object)\\n\", \"  File \\\"/var/task/webcaptions.py\\\", line 77, in __init__\\n    raise MasExecutionError(operator_object.return_output_object())\\n\"]}"
  }
}

It seems the application fails to identify the SourceLangnugeCode because after editing the translated subtitles and saving, the SourceLanguageCodes (en) and TargetLanguageCodes (es) are both passed as the TargetLanguageCodes, seen below.

WebToVTCaptions (TransformText) error

'Configuration': {'MediaType': 'MetadataOnly', 'Enabled': True, 'TargetLanguageCodes': ['es', 'en']}, 'Status': 'Error', 'MetaData': {'WebCaptionsError': \\\"No valid inputs 'SourceLanguageCode'\\\"},

Screenshots

image

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions