Graphviz Diagram not working in asciidoc.

97 views
Skip to first unread message

Piran Caci

unread,
Mar 10, 2020, 12:04:12 PM3/10/20
to asciidoc
Hello everyone, 

I try to implement an example of an graphviz diagram in asciidoc and i get the following error: 
Failed to generate image: Could not find the 'dot' executable in PATH; add it to the PATH or specify its location using the 'graphvizdot' document attribute

this is my example:

["graphviz", "dia.png"]
----
digraph automata_0 {
  size ="8.5, 11";
  node [shape = circle];
  0 [ style = filled, color=lightgrey ];
  2 [ shape = doublecircle ];
  0 -> 2 [ label = "a " ];
  0 -> 1 [ label = "other " ];
  1 -> 2 [ label = "a " ];
  1 -> 1 [ label = "other " ];
  2 -> 2 [ label = "a " ];
  2 -> 1 [ label = "other " ];
  "Machine: a" [ shape = plaintext ];
}

----

I have set the environmental variable GRAPHVIZ_DOT and the path GRAPHVIZ_HOME. I'm not sure why I'm still not able to get an image.

I use Windows.

Thank you in advance.

Lex Trotman

unread,
Mar 10, 2020, 6:54:28 PM3/10/20
to asci...@googlegroups.com
On Wed, 11 Mar 2020 at 02:04, Piran Caci <pira...@gmail.com> wrote:
>
> Hello everyone,
>
> I try to implement an example of an graphviz diagram in asciidoc and i get the following error:
>
> Failed to generate image: Could not find the 'dot' executable in PATH; add it to the PATH or specify its location using the 'graphvizdot' document attribute
>

The message says Asciidoc can't run graphviz executables.

You did install graphviz and it works from the command line?

>
> this is my example:
>
>
> ["graphviz", "dia.png"]
> ----
> digraph automata_0 {
> size ="8.5, 11";
> node [shape = circle];
> 0 [ style = filled, color=lightgrey ];
> 2 [ shape = doublecircle ];
> 0 -> 2 [ label = "a " ];
> 0 -> 1 [ label = "other " ];
> 1 -> 2 [ label = "a " ];
> 1 -> 1 [ label = "other " ];
> 2 -> 2 [ label = "a " ];
> 2 -> 1 [ label = "other " ];
> "Machine: a" [ shape = plaintext ];
> }
>
> ----
>
>
> I have set the environmental variable GRAPHVIZ_DOT and the path GRAPHVIZ_HOME. I'm not sure why I'm still not able to get an image.
>

As the message above says, set the document attribute `graphvizdot`,
not environment variables.

Cheers
Lex

>
> I use Windows.
>
>
> Thank you in advance.
>
> --
> You received this message because you are subscribed to the Google Groups "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to asciidoc+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/asciidoc/ee94bc4d-8ed5-4b62-9ddd-c8ffb7dca490%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages