I am using pygraphviz
1.6 to generate the a plot using Python 3.6. Unfortunately, I can't update Python.
While generating the graph, the command graph.layout("dot")
generates the error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 2882, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-4-d73a7e09eb44>", line 6, in <module>
graph.layout("dot")
File "/usr/local/lib/python3.6/dist-packages/pygraphviz/agraph.py", line 1422, in layout
data = self._run_prog(prog, " ".join([args, "-T", fmt]))
File "/usr/local/lib/python3.6/dist-packages/pygraphviz/agraph.py", line 1387, in _run_prog
raise OSError(b"".join(errors).decode(self.encoding))
OSError: libpath/shortest.c:324: triangulation failed
libpath/shortest.c:200: destination point not in any triangle
Error: in routesplines, Pshortestpath failed
In order to reproduce the issue, you must download the file graph_data.txt from https://drive.google.com/file/d/12YjB752SfCrzHmycRDeYAH2PHL6gMiIJ/view?usp=sharing , and run the following code:
import pygraphviz as pgv
with open("graph_data.txt", "wb") as fp:
graph_data = fp.read()
graph = pgv.AGraph()
graph.from_string(graph_data)
graph.layout("dot")
graph.draw(settings.PIPELINE_GRAPH_PATH, format="pdf")