Skip to content

Errors and Edge Cases

m4bwav edited this page Oct 12, 2026 · 1 revision

Every error here came from a real run of 0.1.2 (the saved output). pw.py never prints a bare traceback: an unexpected exception becomes {"ok": false, "error": "<Type>: <message>"} with exit code 1.

A file that is not there

python pw.py inspect nothing-here.glb
{
 "ok": false,
 "error": "file not found: nothing-here.glb"
}

Exit code 1.

An unknown target

python pw.py check park/solid.stl --target game-godot
{
 "ok": false,
 "error": "unknown target game-godot",
 "known": [
  "game-roblox",
  "game-unity",
  "game-unreal",
  "web-threejs",
  "ar-usdz",
  "commerce-gltf",
  "print-fdm",
  "print-resin",
  "video-blockout",
  "cad-step"
 ]
}

Exit code 2.

A box the wrong way round

--bbox is south, west, north, east.

python pw.py place --bbox 40.0010,-75.0000,40.0000,-74.9987 --out park2
{
 "ok": false,
 "error": "bbox must be S,W,N,E with S<N and W<E"
}

Exit code 2.

place also refuses a box over --max-km2 (4 by default) before asking any server, and stops with every server's error when Overpass fails (FAQ).

No ComfyUI host

python pw.py gen --image bricks.png --out raw.glb --host http://127.0.0.1:9
{
 "ok": false,
 "error": "no ComfyUI host with hunyuan3d-dit-v2.safetensors or hunyuan3d-dit-v2-turbo.safetensors",
 "tried": [
  {
   "host": "http://127.0.0.1:9",
   "up": false,
   "error": "<urlopen error [WinError 10061] No connection could be made because the target machine actively refu"
  }
 ],
 "next": "start ComfyUI with the Hunyuan3D-2 checkpoints in models/checkpoints, set POLYWRIGHT_COMFYUI, or use a hosted generator (polywright-generate)"
}

Exit code 1.

With --workflow, gen looks for a host that has every node class in the workflow:

python pw.py gen --image bricks.png --workflow ui-workflow.json --out raw.glb --host http://127.0.0.1:9
{
 "ok": false,
 "error": "no ComfyUI host has every node in the workflow",
 "tried": [
  {
   "host": "http://127.0.0.1:9",
   "up": false,
   "error": "<urlopen error [WinError 10061] No connection could be made because the target machine actively refu"
  }
 ]
}

Exit code 1.

When a host rejects a graph, gen prints ComfyUI's own node_errors (since 0.1.2).

A bpy script fails

python pw.py bpy old_api.py

where old_api.py calls bpy.ops.import_scene.obj, which Blender 4 removed:

{
 "ok": false,
 "exit_code": 3,
 "seconds": "<s>",
 "blender": "5.2.1",
 "output": [],
 "errors": [
  "Traceback (most recent call last):",
  "  File \"old_api.py\", line 2, in <module>",
  "    bpy.ops.import_scene.obj(filepath=\"chair.obj\")",
  "    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^",
  "AttributeError: Calling operator \"bpy.ops.import_scene.obj\" error, could not be found",
  "Error: script failed, file: 'old_api.py', exiting."
 ],
 "traceback": [
  "Traceback (most recent call last):",
  "  File \"old_api.py\", line 2, in <module>",
  "    bpy.ops.import_scene.obj(filepath=\"chair.obj\")",
  "    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^",
  "AttributeError: Calling operator \"bpy.ops.import_scene.obj\" error, could not be found"
 ],
 "hint": "bpy API traps by Blender version: polywright-blender references/bpy-api-traps.md"
}

Exit code 1.

exit_code 3 is Blender's: pw.py runs it with --python-exit-code 3, because without that flag Blender exits 0 after a Python error.

A check that fails

A failed check exits 1 with status: fail; see How checks decide.

Known limits in 0.1.2

  • check does not measure wall thickness; min_feature is reported as unchecked.
  • printable makes one solid by voxel remeshing, which softens sharp detail finer than the voxel (size/500 by default); --voxel-mm sets it.
  • place ignores building roof shapes and min_height, and paints ground by land use without textures.
  • Blender discovery on macOS and Linux installs is written but not tested.
  • gen was tested with Hunyuan3D-2 and both branches of ComfyUI's TRELLIS.2 and Pixal3D template, at the template's defaults only; hosted services were not tried.

Clone this wiki locally