My attempt to define a directory and include an external file fails with "Some diagram description contains error"

0 votes
asked Dec 11, 2015 in To be sorted by judielaine (120 points)

I wanted to start including my skin parameters, so tried using !include. This resulted in an error. I can't see aything that i'm doing wrong with paths and constructed a trivial example to determine if the issue really was with the include. It seems it is. Unfortunately, verbose output and the image error both fail to provide insight in what i am doing wrong. 

Here's the experiment:

Let Bob.pu

@startuml
 
'!define PLANTUML_HOME /Users/bushj/Google\ Drive/SyncTools/PUML
'!include PLANTUML_HOME/SimpleSkin.iuml
skinparam TitleFontColor  red
Title SAML MD Simplified Overview 
 
@enduml
Run java -jar ~/plantuml.jar -verbose ~/Documents/OneDriveBusiness/Bob.pu
SUCCESS!
Remove the comment from define & run again, SUCCESS! (Successful verbose output after the failure.
Let SimpleSkin.iuml
skinparam TitleFontColor  blue

Let Bob.pu

@startuml
 
!define PLANTUML_HOME /Users/bushj/Google\ Drive/SyncTools/PUML
!include PLANTUML_HOME/SimpleSkin.iuml
'skinparam TitleFontColor  red
Title SAML MD Simplified Overview 
 
@enduml
Run java -jar ~/plantuml.jar -verbose ~/Documents/OneDriveBusiness/Bob.pu
 
RESULT
(0.000 - 123 Mo) 120 Mo - PlantUML Version 8033
... same as success ...
[here, the output diverges from success]
(2.729 - 220 Mo) 166 Mo - Creating image 572x91
(2.771 - 220 Mo) 161 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(2.847 - 220 Mo) 159 Mo - Number of image(s): 1
Error line 3 in file: /Users/bushj/Documents/OneDriveBusiness/Bob.pu
Some diagram description contains errors
 
The resulting image - https://drive.google.com/file/d/0BwP9rg2b1QL3cnoxY1lyYTBGR0E/view?usp=sharing - indicates the error is at line 4,
 
Cannot include /Users/bushj/Google\ Drive/SyncTools/PUML/SimpleSkin.iuml
Syntax Error?
 
 
This is what success looks like in verbose output
(0.001 - 123 Mo) 120 Mo - PlantUML Version 8033
(0.073 - 123 Mo) 119 Mo - GraphicsEnvironment.isHeadless() false
(0.082 - 123 Mo) 119 Mo - Setting current dir: .
(0.082 - 123 Mo) 119 Mo - Setting current dir: /Users/bushj/Documents/OneDriveBusiness
(0.083 - 123 Mo) 119 Mo - Using default charset
(0.089 - 123 Mo) 118 Mo - Setting current dir: /Users/bushj/Documents/OneDriveBusiness
(0.094 - 123 Mo) 118 Mo - Setting current dir: /Users/bushj/Documents/OneDriveBusiness
(0.095 - 123 Mo) 118 Mo - Reading file: /Users/bushj/Documents/OneDriveBusiness/Bob.pu
(0.095 - 123 Mo) 118 Mo - name from block=null
(0.381 - 123 Mo) 104 Mo - Creating file: /Users/bushj/Documents/OneDriveBusiness/Bob.png
(0.530 - 123 Mo) 102 Mo - Creating image 10x10
(0.603 - 123 Mo) 102 Mo - Creating image 10x10
(0.634 - 123 Mo) 99 Mo - Starting Graphviz process [/usr/local/bin/dot, -Tsvg]
(0.635 - 123 Mo) 99 Mo - DotString size: 101
(0.647 - 123 Mo) 98 Mo - Ending process ok
(0.647 - 123 Mo) 98 Mo - Ending Graphviz process
(2.172 - 123 Mo) 94 Mo - Creating image 270x29
(2.190 - 123 Mo) 94 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(2.240 - 123 Mo) 94 Mo - Number of image(s): 1
 
 

1 Answer

0 votes
answered Dec 11, 2015 by plantuml (295,000 points)
selected Dec 11, 2015 by judielaine
 
Best answer

Hello,

Thanks for the detail report.

I think that the issue comes from the space in your path.

You should try to change the line:

!define PLANTUML_HOME /Users/bushj/Google\ Drive/SyncTools/PUML

to:

!define PLANTUML_HOME /Users/bushj/Google Drive/SyncTools/PUML

Tell us if it works that way for you.

commented Dec 11, 2015 by judielaine (120 points)
Thank you! Lesson noted.
...