affaan-m/ECC · error · RuntimeError
blender rendered nothing
Error message
blender rendered nothing:
{proc.stdout[-800:]}
{proc.stderr[-800:]} What it means
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.
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.
Example fix
// before
render3d.turntable('bad.glb', 'out/') # blender script raises internally
// after
import trimesh
m = trimesh.load('bad.glb', force='scene')
assert any(g.faces.size for g in m.geometry.values()), 'empty mesh'
frames = render3d.turntable('good.glb', 'out/') Defensive patterns
Strategy: try-catch
Validate before calling
import shutil
from pathlib import Path
def validate_render_env(mesh_path, dest):
if shutil.which('blender') is None:
raise EnvironmentError('blender not on PATH')
Path(dest).mkdir(parents=True, exist_ok=True)
if not Path(mesh_path).is_file():
raise FileNotFoundError(mesh_path) Type guard
def blender_available() -> bool:
import shutil
return shutil.which('blender') is not None Try / catch
try:
frames = turntable(mesh_path, dest)
except RuntimeError as e:
if 'blender rendered nothing' in str(e):
logger.error('blender failure tail: %s', str(e)[:1600])
raise # inspect embedded stdout/stderr for root cause Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/6acead3b0fbb38b9.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/taste/render3d.py:253
) -> list[Path]:
dest = Path(dest)
dest.mkdir(parents=True, exist_ok=True)
with tempfile.NamedTemporaryFile("w", suffix=".py", delete=False) as fh:
fh.write(_BLENDER_SCRIPT)
script = fh.name
cfg = json.dumps({
"mesh": str(Path(mesh_path).resolve()),
"dest": str(dest.resolve()),
"frames": n_frames, "size": size, "engine": engine,
})
proc = subprocess.run(
["blender", "-b", "--python", script, "--", cfg],
capture_output=True, text=True, timeout=timeout,
)
Path(script).unlink(missing_ok=True)
frames = sorted(dest.glob("turn_*.png"))
if not frames:
raise RuntimeError(f"blender rendered nothing:\n{proc.stdout[-800:]}\n{proc.stderr[-800:]}")
return frames
def turntable(
mesh_path: str | Path,
dest: str | Path,
n_frames: int = 48,
size: int = 768,
backend: str = "auto",
) -> tuple[list[Path], str]:
"""Render a turntable. Returns ``(frames, backend_used)``."""
if backend == "auto":
backend = "blender" if have_blender() else "software"
if backend == "blender":
try:
return turntable_blender(mesh_path, dest, n_frames, size), "blender"
except Exception:
# A failed Blender render must not lose the asset; the softwareView on GitHub (pinned to 8321021c54)