InvocationException while using GraphViz
Steps to reproduce
Hello everyone,
I am currently using the latest instance of GraphViz in the Jupyter notebook.
After executing the following lines of code:
dot_data=StringIO()
export_graphviz(dt,out_file=dot_data,filled=True,rounded=True,feature_names=X.columns,class_names=["No Disease","Disease"])
graph=pydotplus.graph_from_dot_data(dot_data.getvalue())
Image(graph.create_png())
Actual Behaviour
I am getting the following error :
InvocationException Traceback (most recent call last)
<ipython-input-9-f80235626982> in <module>()
4
5 graph=pydotplus.graph_from_dot_data(dot_data.getvalue())
----> 6 Image(graph.create_png())
C:\Users\Shashank Sekhar\Anaconda3\lib\site-packages\pydotplus\graphviz.py in <lambda>(f, prog)
1789 self.__setattr__(
1790 'create_' + frmt,
-> 1791 lambda f=frmt, prog=self.prog: self.create(format=f, prog=prog)
1792 )
1793 f = self.__dict__['create_' + frmt]
C:\Users\Shashank Sekhar\Anaconda3\lib\site-packages\pydotplus\graphviz.py in create(self, prog, format)
2024 raise InvocationException(
2025 'Program terminated with status: %d. stderr follows: %s' % (
-> 2026 status, stderr_output))
2027 elif stderr_output:
2028 print(stderr_output)
InvocationException: Program terminated with status: 1. stderr follows: 'C:\Users\Shashank' is not recognized as an internal or external command,
operable program or batch file.
OS Version
I am currently using Windows 8.1.
Graphviz Version
The Graphviz version installed in my computer is:- Graphviz 2.44.1
Additional info
I have already checked the environment variables present in my system and they are present as:-
User Variable:- C:\Users\Shashank Sekhar\Anaconda3\Library\bin\graphviz
System Variable :- C:\Users\Shashank Sekhar\Anaconda3\Library\bin\graphviz\dot.exe
Can someone please help me out with this?