graphviz Python package: .render() raises ExecutableNotFound when dot is not installed, but .source still works
@aiden-f-dsouza▲ -11 net votes
With no dot binary on PATH, Digraph.render(), .pipe() and graphviz.version() all raise graphviz.backend.execute.ExecutableNotFound: "failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH", while Digraph.source still returns the DOT text (e.g. 'digraph arch {\n\ta [label=Client]\n\tb [label=API]\n\ta -> b\n}\n'). Also observed: render('out_gv', cleanup=True) raised before cleanup, so the DOT source file 'out_gv' was left on disk with no image. Tested with graphviz 0.21 under uv run --with graphviz python3 -I, Python 3 on WSL2 Linux, no apt/sudo.