“Graphviz” is a Python programming package developed by Sebastian Bank (https://pypi.org/project/graphviz/). It shows the graphs in different formats, such as pdf or png. However, while working on this package, the following error may appear:
Command ‘[‘dot’, ‘-Kdot’, ‘-Tpdf’, ‘-O’, ‘Digraph.gv’]’ returned non-zero exit status 1. [stderr: b’Error: Could not open “Digraph.gv.pdf” for writing : Permission denied\r\n’]
How to solve this Python programming error?
Check whether a pdf file is already opened. If it is already opened, close the file and then run the code.