{"record":{"id":"6acead3b0fbb38b9","repo":"affaan-m/ECC","slug":"blender-rendered-nothing-proc-stdout-800-proc-stderr-800","errorCode":null,"errorMessage":"blender rendered nothing:\n{proc.stdout[-800:]}\n{proc.stderr[-800:]}","messagePattern":"blender rendered nothing:\n(.+?)\n(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/taste/render3d.py","lineNumber":253,"sourceCode":") -> list[Path]:\n    dest = Path(dest)\n    dest.mkdir(parents=True, exist_ok=True)\n    with tempfile.NamedTemporaryFile(\"w\", suffix=\".py\", delete=False) as fh:\n        fh.write(_BLENDER_SCRIPT)\n        script = fh.name\n    cfg = json.dumps({\n        \"mesh\": str(Path(mesh_path).resolve()),\n        \"dest\": str(dest.resolve()),\n        \"frames\": n_frames, \"size\": size, \"engine\": engine,\n    })\n    proc = subprocess.run(\n        [\"blender\", \"-b\", \"--python\", script, \"--\", cfg],\n        capture_output=True, text=True, timeout=timeout,\n    )\n    Path(script).unlink(missing_ok=True)\n    frames = sorted(dest.glob(\"turn_*.png\"))\n    if not frames:\n        raise RuntimeError(f\"blender rendered nothing:\\n{proc.stdout[-800:]}\\n{proc.stderr[-800:]}\")\n    return frames\n\n\ndef turntable(\n    mesh_path: str | Path,\n    dest: str | Path,\n    n_frames: int = 48,\n    size: int = 768,\n    backend: str = \"auto\",\n) -> tuple[list[Path], str]:\n    \"\"\"Render a turntable. Returns ``(frames, backend_used)``.\"\"\"\n    if backend == \"auto\":\n        backend = \"blender\" if have_blender() else \"software\"\n    if backend == \"blender\":\n        try:\n            return turntable_blender(mesh_path, dest, n_frames, size), \"blender\"\n        except Exception:\n            # A failed Blender render must not lose the asset; the software","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/taste/render3d.py#L235-L271","documentation":"render3d.py raises RuntimeError('blender rendered nothing: ...') when the headless blender subprocess finished but produced no turn_*.png frames in the destination directory. The message embeds the last 800 chars of Blender's stdout/stderr to expose the underlying failure.","triggerScenarios":"Calling turntable_blender (or turntable) when the blender binary is missing/fails to launch, the Python script inside Blender throws (e.g. no mesh — see error 922), the output path is unwritable, or the frame render settings produce zero frames before timeout.","commonSituations":"blender not installed or not on PATH (launch failure surfaces in stderr); the embedded bpy script raised (import error, no mesh); disk permission issues on dest; timeout killing the process mid-render.","solutions":["Read the embedded proc.stdout/proc.stderr tail in the message to identify the real Blender error.","Confirm `blender --version` works in the shell and the binary is on PATH.","Fix the root cause in the Blender script — most commonly the mesh file (no mesh in file) or an unwritable dest directory.","Increase the timeout if rendering was killed before any frame was written."],"exampleFix":"// before\nrender3d.turntable('bad.glb', 'out/')  # blender script raises internally\n// after\nimport trimesh\nm = trimesh.load('bad.glb', force='scene')\nassert any(g.faces.size for g in m.geometry.values()), 'empty mesh'\nframes = render3d.turntable('good.glb', 'out/')","handlingStrategy":"try-catch","validationCode":"import shutil\nfrom pathlib import Path\ndef validate_render_env(mesh_path, dest):\n    if shutil.which('blender') is None:\n        raise EnvironmentError('blender not on PATH')\n    Path(dest).mkdir(parents=True, exist_ok=True)\n    if not Path(mesh_path).is_file():\n        raise FileNotFoundError(mesh_path)","typeGuard":"def blender_available() -> bool:\n    import shutil\n    return shutil.which('blender') is not None","tryCatchPattern":"try:\n    frames = turntable(mesh_path, dest)\nexcept RuntimeError as e:\n    if 'blender rendered nothing' in str(e):\n        logger.error('blender failure tail: %s', str(e)[:1600])\n        raise  # inspect embedded stdout/stderr for root cause","preventionTips":["Check `blender --version` before batch renders","Always read the stdout/stderr tail embedded in the message","Ensure dest directory is writable by the blender process","Use a timeout large enough for the frame count and scene complexity"],"tags":["blender","subprocess","render"],"backgroundTag":"command-not-found","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"}