You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dot and svg diagrams fail to generate without useful error message #649
When trying to generate dot or svg diagrams either exporting to a file or via Sphinx the diagram generation fails with no meaningful error just that the dot process exited code 1.
Retrieving the diagrams generated dot text string, creating a file, and using dot command directly more meaningful errors are given e.g. Error: HandleCommandStateMachine_original.dot: syntax error in line 25 near ','
the corresponding lines in the dot file, excerpt from line 23-27:
Unicode right double quotation marks U201D ” are used throughout, replacing these with straight quotation marks U0022 " dot completes successfully and correctly generates the svg file.
Strangely the errors only seem to only be raised at subgraph styles that have multiple properties like the one shown in this example.
Thanks for the detailed report, and for the kind words!
I could not reproduce the curly quotes: with pydot 4.0.1 the renderer emits straight quotes (style="rounded, solid"), and grep for U+201C/U+201D over the library finds none in the generated DOT. The only place they could come from is the copy step between the library output and the .dot file, so if you still see them, could you share a minimal machine that produces them, how you exported the DOT text, and your Graphviz version (dot -V)?
The part that is a real defect is the error message: pydot prints Graphviz's stderr to stdout and raises an AssertionError that only says returned code: 1, so the syntax error in line 25 near ',' never reaches the exception or the Sphinx warning. #672 fixes that: every path that runs dot (the svg format, _repr_svg_(), the command line and the Sphinx directive) now raises GraphvizError with the requested format and what Graphviz wrote to stderr, and the Sphinx build warning carries the same text. It will ship in 3.2.2.
Activity
fgmacedo commentedon Oct 12, 2026
Thanks for the detailed report, and for the kind words!
I could not reproduce the curly quotes: with pydot 4.0.1 the renderer emits straight quotes (
style="rounded, solid"), andgrepfor U+201C/U+201D over the library finds none in the generated DOT. The only place they could come from is the copy step between the library output and the.dotfile, so if you still see them, could you share a minimal machine that produces them, how you exported the DOT text, and your Graphviz version (dot -V)?The part that is a real defect is the error message: pydot prints Graphviz's stderr to stdout and raises an
AssertionErrorthat only saysreturned code: 1, so thesyntax error in line 25 near ','never reaches the exception or the Sphinx warning. #672 fixes that: every path that runsdot(thesvgformat,_repr_svg_(), the command line and the Sphinx directive) now raisesGraphvizErrorwith the requested format and what Graphviz wrote to stderr, and the Sphinx build warning carries the same text. It will ship in 3.2.2.