mbrav / ansible-inventory-diagram

Script for generating infrastructure diagrams from Ansible inventory files
GNU General Public License v3.0
1 stars 1 forks source link

Graphviz Loading Problem #2

Open Ernestas-S opened 10 months ago

Ernestas-S commented 10 months ago

Graphviz was not loading correctly, although

'C:/Program Files/Graphviz/bin' is added to the User Path and 'C:/Program Files/Graphviz/bin/dot.exe' is added to the System Path

This issue was fixed by adding the location to where the bin file is located to the top of the main.py file: Example: import os os.environ["PATH"] += os.pathsep + 'C:/Program Files/Graphviz/bin'

mbrav commented 10 months ago

I cannot replicate this issue since I do not use Windows. To setup Graphviz, I recommend looking at the Diagrams documentation as well as Graphviz documentation.

But given that in your case Graphviz becomes callable only when os.environ["PATH"] is modified, I can only suspect that the binary location for Graphviz was not actually added to your PATH environment variable when launching the Python script.

To fix this issue I can suggest reading this.