HKUDS/nanobot · error · ImageGenerationError
ModelScope image generation request timed out
Error message
ModelScope image generation request timed out
What it means
Error "ModelScope image generation request timed out" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/providers/image_generation.py:2032
headers=headers,
body=body,
)
finally:
if self._client is None:
await client.aclose()
async def _generate_with_client(
self,
client: httpx.AsyncClient,
*,
url: str,
headers: dict[str, str],
body: dict[str, Any],
) -> GeneratedImageResponse:
try:
response = await client.post(url, headers=headers, json=body)
except httpx.TimeoutException as exc:
raise ImageGenerationError("ModelScope image generation request timed out") from exc
except httpx.RequestError as exc:
raise ImageGenerationError(f"ModelScope image generation request failed: {exc}") from exc
try:
response.raise_for_status()
except httpx.HTTPStatusError as exc:
detail = _http_error_detail(response)
raise ImageGenerationError(f"ModelScope image generation failed: {detail}") from exc
task_data = response.json()
task_id = task_data.get("task_id")
if not task_id:
raise ImageGenerationError(
f"ModelScope did not return a task_id: {response.text[:500]}"
)
images = await self._poll_task(client, task_id, headers)
View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/providers/image_generation.py:2032 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/d851a16e09b079d4.
Report an issue: GitHub.