{"record":{"id":"9132e1970cff65d0","repo":"calesthio/OpenMontage","slug":"jimeng-task-invalid-status-status","errorCode":null,"errorMessage":"Jimeng task invalid: status={status}","messagePattern":"Jimeng task invalid: status=(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/video/jimeng_video.py","lineNumber":321,"sourceCode":"            \"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)\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            status = (data.get(\"data\") or {}).get(\"status\", \"\")\n            if status == \"done\":\n                video_url = (data.get(\"data\") or {}).get(\"video_url\")\n                if not video_url:\n                    raise RuntimeError(f\"Jimeng task done but no video_url: {data}\")\n                return video_url\n            if status in (\"not_found\", \"expired\"):\n                raise RuntimeError(f\"Jimeng task invalid: status={status}\")\n        raise TimeoutError(f\"Jimeng task {task_id} did not finish within {timeout_seconds}s\")\n\n    @staticmethod\n    def _sign(\n        method: str, path: str, query_params: dict,\n        headers: dict, body: bytes, ak: str, sk: str,\n    ) -> dict:\n        now = datetime.now(timezone.utc)\n        x_date = now.strftime(\"%Y%m%dT%H%M%SZ\")\n        short_date = x_date[:8]\n\n        body_hash = hashlib.sha256(body).hexdigest()\n        headers = dict(headers)\n        headers[\"Host\"] = _HOST\n        headers[\"X-Date\"] = x_date\n        headers[\"X-Content-Sha256\"] = body_hash\n        headers[\"Content-Type\"] = \"application/json\"\n","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/jimeng_video.py#L303-L339","documentation":"Error \"Jimeng task invalid: status={status}\" thrown in calesthio/OpenMontage.","triggerScenarios":"Jimeng returns a terminal task status that is neither success nor a known in-progress state while polling a video generation task.","commonSituations":"See trigger scenarios.","solutions":["Inspect the returned status value in the error; Jimeng only accepts known task states, so an unexpected status means the task payload or account state is invalid.","Resubmit the task with corrected parameters, or query the task later if the status is transient."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}