HKUDS/nanobot · error · ImageGenerationError
returned no images for this request
Error message
{label} returned no images for this request What it means
Shared result guard _require_images: the provider response contained no images and also no error field — an empty success. The provider claimed success but produced nothing usable, so the tool raises rather than returning an empty result silently.
Solutions
- Retry the generation; empty successes are often transient
- Try a different model or adjust the prompt/aspect_ratio parameters
- Verify the account has quota/entitlement for image generation on that model
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at nanobot/providers/image_generation.py:335 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/101a45a94dcf54d2.
Report an issue: GitHub.
Appendix: source
Thrown at nanobot/providers/image_generation.py:335
@abstractmethod
async def generate(
self,
*,
prompt: str,
model: str,
reference_images: list[str] | None = None,
aspect_ratio: str | None = None,
image_size: str | None = None,
) -> GeneratedImageResponse: ...
def _require_images(self, images: list[str], data: dict[str, Any]) -> None:
if images:
return
provider_error = data.get("error")
label = self.provider_name
if provider_error:
raise ImageGenerationError(f"{label} returned no images: {provider_error}")
raise ImageGenerationError(f"{label} returned no images for this request")
def _http_client_kwargs(self) -> dict[str, Any]:
kwargs: dict[str, Any] = {"timeout": self.timeout}
if self.proxy:
kwargs["proxy"] = self.proxy
kwargs["trust_env"] = False
return kwargs
async def _http_post(
self,
url: str,
*,
headers: dict[str, str],
body: dict[str, Any],
client: httpx.AsyncClient | None = None,
) -> httpx.Response:
if client is not None:
return await client.post(url, headers=headers, json=body)View on GitHub (pinned to 42f37dc4c0)