Hey sorry to bother with this, but I seems somethi...
# hamilton-help
s
Hey sorry to bother with this, but I seems something happened where it seems that
hamilton
can no longer use
graphviz
to create the dag.
graphviz.backend.execute.ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH
Graphviz is added to path and I am able to do this example from the docs. I tried: • creating a fresh venv • reinstalling sf-hamilton[visualization] Any ideas?
s
I think this is a system issue. I have encountered this once before, and restarting the computer fixed it 🤷 otherwise in that new environment, you could open up a python interpreter and validate that graphviz works running some of that python you linked to?
otherwise does it work in a notebook? or only when writing to a file?
s
Yeah it wrote the
.gv
file but not the
.svg
and throws the same error
s
can you validate the .svg on a simple DAG to rule out it being something with your particular Hamilton DAG?
s
It being, doing the
graphviz
hello world with the
graphviz
lib
s
wait so
.svg
fails independent of Hamilton?
s
yes sir
Copy code
import graphviz
dot = graphviz.Digraph('hello', format="svg")
dot.edge('hello', 'world')
dot.render("hello-world")
This writes the
.gv
file but not the
.svg
and raises the same error.
s
hmm — not sure I can help you there — have you tried reinstalling graphviz?
or restarting your machine?
s
restarting seemed to fix, ty
šŸ™Œ 1
v
Had the same problem. You need to install the package
python-graphviz
, instead.
s
dr.visualize_execution()
keeps finding this error from Jupyter. Is this still a
graphviz
issue outside of
hamilton
scope?
Copy code
File c:\codebase\volume-reporting\vol-rep-venv\lib\site-packages\graphviz\jupyter_integration.py:98, in <dictcomp>(.0)
     96 include = set(include) if include is not None else {self._jupyter_mimetype}
     97 include -= set(exclude or [])
---> 98 return {mimetype: getattr(self, method_name)()
     99         for mimetype, method_name in MIME_TYPES.items()
    100         if mimetype in include}

File c:\codebase\volume-reporting\vol-rep-venv\lib\site-packages\graphviz\jupyter_integration.py:112, in JupyterIntegration._repr_image_svg_xml(self)
    110 def _repr_image_svg_xml(self) -> str:
...
    102 stdout, stderr = popen.communicate()
    103 return subprocess.CompletedProcess(popen.args, popen.returncode,
    104                                    stdout=stdout, stderr=stderr)

BrokenPipeError: [Errno 32] Broken pipe
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
s
\site-packages\graphviz\jupyter_integration.py
Unfortunately yes — this is down in graphviz