{"record":{"id":"45ac6a1dadb3b95a","repo":"calesthio/OpenMontage","slug":"jimeng-submit-returned-no-task-id-data","errorCode":null,"errorMessage":"Jimeng submit returned no task_id: {data}","messagePattern":"Jimeng submit returned no task_id: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/video/jimeng_video.py","lineNumber":290,"sourceCode":"            \"seed\": int(inputs.get(\"seed\", -1)),\n        }\n        if operation == \"image_to_video\" and inputs.get(\"image_url\"):\n            payload[\"image_urls\"] = [inputs[\"image_url\"]]\n        return payload\n\n    def _submit_task(self, payload: dict[str, Any], *, ak: str, sk: str) -> str:\n        import requests\n\n        query = {\"Action\": \"CVSync2AsyncSubmitTask\", \"Version\": _API_VERSION}\n        body = json.dumps(payload, ensure_ascii=False).encode(\"utf-8\")\n        headers = self._sign(\"POST\", \"/\", query, {}, body, ak, sk)\n        url = f\"https://{_HOST}/?{urllib.parse.urlencode(sorted(query.items()))}\"\n        resp = requests.post(url, data=body, headers=headers, timeout=30)\n        data = self._json_or_raise(resp)\n        self._check_code(resp.status_code, data)\n        task_id = data.get(\"data\", {}).get(\"task_id\")\n        if not task_id:\n            raise RuntimeError(f\"Jimeng submit returned no task_id: {data}\")\n        return task_id\n\n    def _poll_task(\n        self, task_id: str, *, ak: str, sk: str,\n        poll_interval: float, timeout_seconds: int,\n    ) -> str:\n        import requests\n\n        query = {\"Action\": \"CVSync2AsyncGetResult\", \"Version\": _API_VERSION}\n        body = json.dumps({\n            \"req_key\": _REQ_KEY_VIDEO,\n            \"task_id\": task_id,\n            \"req_json\": json.dumps({\"return_url\": True}),\n        }, ensure_ascii=False).encode(\"utf-8\")\n\n        deadline = time.time() + timeout_seconds\n        while time.time() < deadline:\n            time.sleep(poll_interval)","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/jimeng_video.py#L272-L308","documentation":"Raised when the Jimeng (Volcengine CVSync2AsyncSubmitTask) submit call succeeds at the HTTP and code level but the response's data.task_id is missing. The async flow needs the task_id to poll CVSync2AsyncGetResult; without it the tool raises RuntimeError with the full response body so you can see what came back instead.","triggerScenarios":"POST to CVSync2AsyncSubmitTask returns JSON without data.task_id — e.g. req_key not matching a valid video capability, signature/canonical-request issues that pass code checks but route wrong, or an API revision changing the response envelope.","commonSituations":"Invalid or outdated _REQ_KEY_VIDEO after Jimeng API updates; a signing bug (HMAC of body/query) causing a structured-but-empty data object; account not entitled to the video generation capability, returning an error shape the code check does not recognize.","solutions":["Inspect the {data} in the error message to see the actual envelope and any status/message fields inside data.","Verify the Volcengine account has Jimeng video generation enabled and is not out of quota.","Confirm access key / secret key pair is valid and the system clock is in sync (signature includes timestamps).","Update OpenMontage or check Jimeng docs if the response contract (data.task_id) changed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import os\n\nfor var in (\"JIMENG_ACCESS_KEY\", \"JIMENG_SECRET_KEY\"):\n    if not os.environ.get(var):\n        raise RuntimeError(f\"{var} not set — Jimeng submit will fail\")","typeGuard":null,"tryCatchPattern":"try:\n    result = jimeng_video(inputs)\nexcept RuntimeError as e:\n    if \"no task_id\" in str(e):\n        # inspect embedded body; do not blind-retry a contract/auth problem\n        raise ProviderContractError(str(e)) from e\n    raise","preventionTips":["Verify Volcengine credentials and Jimeng entitlement before running pipelines.","Keep system clock synced — Jimeng signatures include timestamps.","Capture the response body from the exception for support tickets."],"tags":["jimeng","volcengine","api-contract","async-jobs","response-shape"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}