HKUDS/nanobot · error · ImageGenerationError
ModelScope image generation task failed: {data}
Error message
ModelScope image generation task failed: {data} What it means
Error "ModelScope image generation task failed: {data}" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/providers/image_generation.py:2088
except httpx.RequestError:
await asyncio.sleep(_MODELSCOPE_POLL_INTERVAL_S)
continue
try:
response.raise_for_status()
except httpx.HTTPStatusError as exc:
detail = _http_error_detail(response)
raise ImageGenerationError(
f"ModelScope task polling failed: {detail}"
) from exc
data = response.json()
status = data.get("task_status")
if status == "SUCCEED":
return await self._collect_images(data)
if status == "FAILED":
raise ImageGenerationError(
f"ModelScope image generation task failed: {data}"
)
await asyncio.sleep(_MODELSCOPE_POLL_INTERVAL_S)
raise ImageGenerationError(
f"ModelScope image generation timed out after "
f"{_MODELSCOPE_POLL_MAX_ATTEMPTS} polls"
)
async def _collect_images(
self,
data: dict[str, Any],
) -> list[str]:
images: list[str] = []
for url in cast(list[object], data.get("output_images") or []):
if isinstance(url, str) and url:
if url.startswith("data:image/"):View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/providers/image_generation.py:2088 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/64f6c1da43fd8247.
Report an issue: GitHub.