{"record":{"id":"9bd4a8d98c26ad0e","repo":"affaan-m/ECC","slug":"image-to-3d-needs-at-least-one-image","errorCode":null,"errorMessage":"image_to_3d needs at least one image","messagePattern":"image_to_3d needs at least one image","errorType":"validation","errorClass":"FalError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/falapi.py","lineNumber":516,"sourceCode":"    it. When in doubt, send one image.\n\n    ``pbr`` requests physically-based maps (metallic, roughness, normal). Without\n    them the mesh lights like painted cardboard in Blender, which defeats the\n    point of minting it. It is ignored when ``geometry_only`` is set.\n\n    Note the endpoint's own input guidance: simple background, single object,\n    object filling >50% of frame. Busy reference stills - collages, wide shots,\n    anything with several subjects - produce garbage meshes. Generate a clean\n    single-object plate first if the pack's stills are not that.\n    \"\"\"\n    if views:\n        payload: dict = {k: v for k, v in views.items() if k in VIEW_FIELDS and v}\n        if \"input_image_url\" not in payload:\n            raise FalError(\"views must include 'input_image_url' (the front view)\")\n    else:\n        urls = [image_url] if isinstance(image_url, str) else list(image_url)\n        if not urls:\n            raise FalError(\"image_to_3d needs at least one image\")\n        payload = {f: u for f, u in zip(VIEW_FIELDS, urls[:len(VIEW_FIELDS)])}\n\n    payload[\"generate_type\"] = \"Geometry\" if geometry_only else \"Normal\"\n    if not geometry_only:\n        payload[\"enable_pbr\"] = bool(pbr)\n    if face_count:\n        # Endpoint range is 40k-1.5M; clamp rather than let it 422.\n        payload[\"face_count\"] = int(max(40_000, min(1_500_000, face_count)))\n\n    result = submit(ENDPOINTS[\"image_to_3d\"], payload, timeout)\n    return _mesh_url(result, ENDPOINTS[\"image_to_3d\"])\n\n\ndef text_to_3d(prompt: str, *, pbr: bool = True, timeout: int = 900) -> str:\n    \"\"\"Mint a textured GLB from a description. Returns the mesh URL.\n\n    The complement to image_to_3d: use it for props the reference *implies*\n    but never shows cleanly enough to lift - the pack's spec describes the","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/falapi.py#L498-L534","documentation":"Argument guard in image_to_3d: the call was made with no image inputs. The image-to-3d endpoint requires at least one reference image (and works best with a clean single-object plate) to produce a mesh.","triggerScenarios":"Calling image_to_3d(image_url=[]) , image_url=None coerced via list(), or passing an empty iterable; also passing a falsy image_url with no views dict.","commonSituations":"An upstream step (batch render, screenshot loop) produced zero images; filtering removed all candidate images before the call; misreading the API and passing a list of prompts instead of image URLs.","solutions":["Pass at least one image URL (the front view) in image_url","Check that the upstream step that produced the image list actually emitted entries","If you have multiple views, pass them in VIEW_FIELDS order (front first)","Validate the list is non-empty before calling image_to_3d"],"exampleFix":"// before\nurls = collect_stills()  # may be empty\nurl = image_to_3d(image_url=urls)\n// after\nurls = collect_stills()\nif not urls:\n    raise SystemExit(\"no stills to convert; run the render step first\")\nurl = image_to_3d(image_url=urls)","handlingStrategy":"validation","validationCode":"urls = image_urls if isinstance(image_urls, (list, tuple)) else [image_urls]\nif not urls or not all(isinstance(u, str) and u for u in urls):\n    raise SystemExit(\"image_to_3d needs at least one non-empty image URL\")","typeGuard":null,"tryCatchPattern":"try:\n    url = image_to_3d(image_url=stills)\nexcept FalError:\n    logging.error(\"no images passed to image_to_3d; stills=%r\", stills)\n    raise","preventionTips":["Assert the upstream still-collection step returned >=1 image before converting","Never pass consumed generators as image_url","Keep the front view as the first element of the list","Fail the pipeline early when a render loop produces zero outputs"],"tags":["validation","arguments","empty-input"],"backgroundTag":"empty-required-field","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}