calesthio/OpenMontage · error · RuntimeError
Non-JSON response from Jimeng API: HTTP {response.status_cod
Error message
Non-JSON response from Jimeng API: HTTP {response.status_code} What it means
Error "Non-JSON response from Jimeng API: HTTP {response.status_code}" thrown in calesthio/OpenMontage.
Source
Thrown at tools/video/jimeng_video.py:391
f"SignedHeaders={signed_str}, Signature={signature}"
)
return headers
@staticmethod
def _safe_error(exc: Exception) -> str:
msg = str(exc)
for var in ("VOLC_SECRETKEY", "VOLC_ACCESSKEY"):
val = os.environ.get(var, "")
if val:
msg = msg.replace(val, "[redacted]")
return msg
@staticmethod
def _json_or_raise(response: Any) -> dict[str, Any]:
try:
return response.json()
except ValueError as exc:
raise RuntimeError(
f"Non-JSON response from Jimeng API: HTTP {response.status_code}"
) from exc
@staticmethod
def _check_code(http_status: int, payload: dict[str, Any]) -> None:
if http_status < 400:
code = payload.get("code", 10000)
if code == 10000:
return
msg = payload.get("message", "unknown error")
raise RuntimeError(f"Jimeng API error: code={code}, msg={msg}")
code = payload.get("code", "unknown")
msg = payload.get("message", "unknown error")
raise RuntimeError(f"Jimeng API error: HTTP {http_status}, code={code}, msg={msg}")
View on GitHub (pinned to 95e1c3d0ab)
Solutions
- The Jimeng API returned a non-JSON body (usually a gateway or proxy error page). Retry the request after a short backoff.
- Verify the endpoint URL and network path; if it persists, capture the raw response body to see the upstream error.
When it happens
Trigger: The Jimeng API responds with a non-JSON body (e.g. an HTML error page or gateway error) instead of the expected JSON payload.
Common situations: See trigger scenarios.
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/b815e273acb13d7b.
Report an issue: GitHub.