Closed valentin-noske closed 3 years ago
well, looks like dot
is probably not installed on your Windows machine. Did you install Graphviz on your machine?
I have installed graphviz. Could it be that it cannot be found by my PyCharm virtual environment?
I don't think it has to do with PyCharm or venv.
The path to you the executable of dot is in the settings.cfg
file.
Try to run dot on your machine.
Also try PyBoolNet.InteractionGraphs.igraph2image(igraph, "test.pdf")
.
I am not a windows user.
This might help?
Thank you. PyBoolNet.InteractionGraphs.igraph2image(igraph, "test.pdf") produces the same error. Therefore, I am not sure if dot is the problem.
It looks like that this process _winapi.CreateProcess(executable, args..)
leads to an error as executable is equal to None. The command that is tried to be executed is C:\Users\Valentin\Dropbox\Bachelorarbeit\Marker_Detection\venv2\lib\site-packages\pyboolnet-2.31.0-py3.8.egg\PyBoolNet\Dependencies\fdp -Tpdf -o test.pdf
.
fdp
also belongs to Graphviz. Windows can't find the executable. Try running fdp
or dot
from the command line.
This works!
What happens if you edit the path to dot or fdp in
C:\Users\Valentin\Dropbox\Bachelorarbeit\Marker_Detection\venv2\lib\site-packages\pyboolnet-2.31.0-py3.8.egg\PyBoolNet\Dependencies\settings.cfg
Thanks. Yes, this worked. If I add the path of the program here (e.g dot = C:\Program Files\Graphviz\bin\dot), I dont have the problem anymore. I seems to be that pycharm is not using my Pathvariables.
Ah, so it works even if you don't change the settings but run your script from the command line outside of PyCharm?
No, I checked if that's the case but it is not. So I was wrong. But in pycharm it works now with the changes.
Interesting. And great that it works now! :tada:
I tried to use the igraph2image function but an error occured in the subprocess.py. This is was trying to do. `network = "models/mathmodel_1.bnet"
And this is the error message I got from that.
PyBoolNet.InteractionGraphs.igraph2image(igraph, "test.pdf", LayoutEngine="dot") File "C:\Users\Valentin\Dropbox\Bachelorarbeit\Marker_Detection\venv2\lib\site-packages\pyboolnet-2.31.0-py3.8.egg\PyBoolNet\InteractionGraphs.py", line 214, in igraph2image PyBoolNet.Utility.DiGraphs.digraph2image(IGraph, FnameIMAGE, LayoutEngine=LayoutEngine, Silent=Silent) File "C:\Users\Valentin\Dropbox\Bachelorarbeit\Marker_Detection\venv2\lib\site-packages\pyboolnet-2.31.0-py3.8.egg\PyBoolNet\Utility\DiGraphs.py", line 248, in digraph2image proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "C:\Users\Valentin\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Valentin\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2]Das System kann die angegebene Datei nicht finden