Error: dot generates empty file. Check you dot installation.

0 votes
asked Nov 8, 2018 in Question / help by AV (120 points)

Hi,

I am trying to generate some diagram. I just downloaded plantuml.jar and graphviz in their latest versions.

set GRAPHVIZ_DOT=D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe && "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" -jar c:\vimfiles\plantuml.jar -testdot

The environment variable GRAPHVIZ_DOT has been set to D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe

Dot executable is D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe

Dot version: dot.exe  - graphviz version 2.38.0 (20140413.2041)

Error: dot generates empty file. Check you dot installation.

D:\probook_d\Work\Training\XQuery>set GRAPHVIZ_DOT=D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe && "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" -jar c:\vimfiles\plantuml.jar -testdot

The environment variable GRAPHVIZ_DOT has been set to D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe

Dot executable is D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe

Dot version: dot.exe  - graphviz version 2.38.0 (20140413.2041)

Error: dot generates empty file. Check you dot installation.

The diagram is:

@startuml

class Foo

note left: On last defined class

note top of Object

  In java, <size:18>every</size> <u>class</u>

  <b>extends</b>

  <i>this</i> one.

end note

note as N1

  This note is <u>also</u>

  <b><color:royalBlue>on several</color>

  <s>words</s> lines

  And this is hosted by <img:sourceforge.jpg>

end note

@enduml

1 Answer

0 votes
answered Nov 9, 2018 by albert (3,130 points)

At first glance this looks a bit strange.

When I give the commands

- set GRAPHVIZ_DOT=D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe

- "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" -jar c:\vimfiles\plantuml.jar -testdot

everything works fine.

When I use:

- set GRAPHVIZ_DOT=D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe && "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" -jar c:\vimfiles\plantuml.jar -testdot

I also get the error. Looks that the GRAPHVIZ_DOT variable is set correctly, but that the java command cannot be executed properly. Even after the total command just the java command doesn't work. When I reset the GRAPHVIZ_DOT and set it by hand again it works.

I did some further test:

- echo #%GRAPVIZ_DOT%#

and got:

#D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe #

Note the space!!

When using the command:

set GRAPHVIZ_DOT=D:\probook_d\Projects\Tools\graphviz-2.38\release\bin\dot.exe& "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" -jar c:\vimfiles\plantuml.jar -testdot

So it looks like a nice quirk of the shell but a little bit  understandable as spaces are allowed in the set command.

@plantuml maybe it is possible to strip away the space at the end when using it?

commented Nov 9, 2018 by albert (3,130 points)
Looks like the space does not show nicely in the above, just test it yourself and you will see it.
...