Hi,
I am trying to add an image (the image exists in the same folder) directly from the Python code and I am getting the following error:
graphviz.backend.execute.CalledProcessError: Command ‘[WindowsPath(‘dot’), ‘-Kdot’, ‘-Tpdf’, ‘-O’, ‘test.gv’]’ returned non-zero exit status 1. [stderr: b’Warning: “1.jpg” was not found as a file or as a shape library member\r\nError: No or improper image file=“1.jpg”\r\nin label of node struct3\r\n’]
The code is simple:
import graphviz
import os
g = graphviz.Digraph('tree', filename='test.gv', node_attr={'shape': 'plaintext'})
g.node('struct3', '''<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
<TR>
<TD ROWSPAN="3"><IMG SRC="1.jpg"/></TD>
</TR>
</TABLE>>''')
g.view()