Skip to content

Dot and svg diagrams fail to generate without useful error message #649

Description

@barnettwilliam

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:

    subgraph cluster_handle { 
        label=<<b>Handle</b><br/><font point-size=”9”>entry / on_enter_handle</font>>; 
        style=”rounded, solid”;    // ****** LINE 25
        cluster=true; 
        penwidth=2.0;

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.

OS: Debian 12 (bookworm)
dot: 2.43.0
python-statemachine: 3.2.1
pydot: 4.0.1
sphinx: 9.0.4
pyhton: 3.11.2

Thank you for this excellent library, the ability to generate diagrams and visualise state machines is particularly nice!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions