{"record":{"id":"d3d9d3e63876c8ff","repo":"HKUDS/nanobot","slug":"reference-image-not-found-value","errorCode":null,"errorMessage":"reference image not found: {value}","messagePattern":"reference image not found: (.+?)","errorType":"exception","errorClass":"ImageGenerationError","httpStatus":null,"severity":"error","filePath":"nanobot/agent/tools/image_generation.py","lineNumber":166,"sourceCode":"        return cls(**kwargs)\n\n    def _resolve_reference_image(self, value: str) -> str:\n        access = current_tool_workspace(self.workspace, restrict_to_workspace=True)\n        workspace = access.project_path or self.workspace\n        try:\n            resolved = resolve_allowed_path(\n                value,\n                workspace=workspace,\n                allowed_root=access.allowed_root,\n                extra_allowed_roots=[get_media_dir()] if access.allowed_root is not None else None,\n                strict=True,\n            )\n        except WorkspaceBoundaryError as exc:\n            raise ImageGenerationError(\n                \"reference_images must be inside the workspace or nanobot media directory\"\n            ) from exc\n        except OSError as exc:\n            raise ImageGenerationError(f\"reference image not found: {value}\") from exc\n        if not resolved.is_file():\n            raise ImageGenerationError(f\"reference image is not a file: {value}\")\n        raw = resolved.read_bytes()\n        if detect_image_mime(raw) is None:\n            raise ImageGenerationError(f\"unsupported reference image: {value}\")\n        return str(resolved)\n\n    def _resolve_reference_images(self, values: list[str] | None) -> list[str]:\n        if not values:\n            return []\n        return [self._resolve_reference_image(value) for value in values if value]\n\n    async def execute(  # pyright: ignore[reportIncompatibleMethodOverride]\n        self,\n        prompt: str,\n        reference_images: list[str] | None = None,\n        aspect_ratio: str | None = None,\n        image_size: str | None = None,","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/agent/tools/image_generation.py#L148-L184","documentation":"Error \"reference image not found: {value}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/agent/tools/image_generation.py:166 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}