calesthio/OpenMontage · error · RuntimeError

DashScope ASR submit succeeded but did not return output.tas

Error message

DashScope ASR submit succeeded but did not return output.task_id

What it means

Raised by the DashScope ASR tool (tools/analysis/dashscope_asr.py) when the async submit POST to the file-transcription endpoint returns HTTP success and passes the error-field check, but output.task_id is absent from the JSON. Without a task_id there is nothing to poll, so the run aborts.

Source

Thrown at tools/analysis/dashscope_asr.py:223

        import requests

        payload = self._build_payload(inputs)
        headers = {
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
            "X-DashScope-Async": "enable",
        }

        # Submit
        submit_resp = requests.post(
            self.SUBMIT_URL, headers=headers, json=payload, timeout=(10, 60)
        )
        submit_data = self._json_or_raise(submit_resp)
        self._raise_for_error(submit_resp.status_code, submit_data)

        task_id = submit_data.get("output", {}).get("task_id")
        if not task_id:
            raise RuntimeError(
                "DashScope ASR submit succeeded but did not return "
                "output.task_id"
            )

        # Poll
        poll_data = self._poll_task(
            requests_module=requests,
            api_key=api_key,
            task_id=task_id,
            poll_interval=float(inputs.get("poll_interval_seconds", 5.0)),
            timeout_seconds=int(inputs.get("timeout_seconds", 300)),
        )

        # qwen3-asr-flash-filetrans returns output.result.transcription_url
        # (singular "result", NOT "results" array like paraformer-v2)
        result = poll_data.get("output", {}).get("result", {})
        transcription_url = result.get("transcription_url")
        if not transcription_url:

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Print/log submit_data to see what the service actually returned — an error body without matching error fields is the usual cause
  2. Verify the model name is exactly qwen3-asr-flash-filetrans and the payload matches current DashScope docs
  3. Confirm the API key has ASR/file-transcription enabled on the DashScope console
  4. Check the SUBMIT_URL matches the documented region endpoint

Example fix

// before
task_id = submit_data.get('output', {}).get('task_id')

// after (diagnose before failing)
task_id = (submit_data.get('output') or {}).get('task_id')
if not task_id:
    raise RuntimeError(
        f'DashScope ASR submit returned no task_id; full body: {submit_data}'
    )
Defensive patterns

Strategy: try-catch

Validate before calling

def submit_response_has_task_id(data: dict) -> bool:
    return bool((data.get('output') or {}).get('task_id'))

Try / catch

try:
    result = tool.run(inputs)
except RuntimeError as e:
    if 'output.task_id' in str(e):
        logger.error('submit body: %s', getattr(e, 'submit_data', '<not captured>'))
        # check model name / key permissions, then retry
    raise

Prevention

When it happens

Trigger: Submitting a transcription job with a wrong/misspelled model name (must be qwen3-asr-flash-filetrans), a payload the service soft-rejects into a non-standard body, or an API response-shape change where the task id moved to another field.

Common situations: Typo in the model parameter; using a parameter schema from a different DashScope ASR version; regional endpoint differences; DASHSCOPE_API_KEY valid for another service but transcription not enabled for the account.

Related errors


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/668f1d29a388509f. Report an issue: GitHub.