Search code examples
python-3.xjupytergraphviz

How to prevent chrome from opening on each run of a juypter notebook that generates a graphviz file?


I am running graphviz inside a jupyter notebook in vs code. Everytime I run a cell that generates a graphviz dot Windows sees the file and opens it in Chrome. It is also displayed inline in the jupyter notebook where I want it. How can I prevent Chrome from opening?

I've tried creating a launch.json as the project didn't have one. This didn't make a difference. I can't find any available configuration settings I can change to prevent Chrome opening.


Solution

  • Really obvious answer. When I transitioned from running the .py file from the command line to the jupyter notebook I didn't comment out the dot.view() (a graphviz call) that displays the result graph. Jupyter will display the results without this. Duh.