Rendering A Tree In Python With Anytree And Graphviz. Can't Open File
This question is based on Tarun's Answer for rendering a tree in python using anytree and graphviz: https://stackoverflow.com/a/49442969/2139007 After installing graphviz and addin
Solution 1:
I just ran into this problem. After 2 hours of debugging, I found out for Windows, you have to set the delete flag to False in dotexporter.py. Go to line 224 in "dotexporter.py" and make the following change. It seems like a bug in the source file. This worked for me:
withNamedTemporaryFile("wb", delete=False) asdotfile:
Solution 2:
This is somehow an unintended behavior of windows and the python temporary file handle. Please just use the latest anytree version (https://anytree.readthedocs.io/en/latest/). It includes a fix.
Post a Comment for "Rendering A Tree In Python With Anytree And Graphviz. Can't Open File"