Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Processing Diagram #60

Closed
evandrocoan opened this issue Feb 12, 2018 · 3 comments · Fixed by wbond/package_control_channel#6946
Closed

Error Processing Diagram #60

evandrocoan opened this issue Feb 12, 2018 · 3 comments · Fixed by wbond/package_control_channel#6946

Comments

@evandrocoan
Copy link

evandrocoan commented Feb 12, 2018

I got this on my console when I ran it on the example diagrams at example.wsd. I fixed this evandrocoan@7a89dee, but now no diagrams show up. How can I know what is the error?

Rendering [(<PlantUmlDiagrams.diagram.plantuml.PlantUMLProcessor object at 0x05F347D0>, ['\nComponent diagram 1\n\n@startuml\n\nskinparam componentStyle uml2\n\ncloud "GoogleDocs" {\n  [GDOC docs]\n}\n\n[GDOC docs] --> [DOCX docs] : Download\n[DOCX docs] --> [MD parts] : DocConvert\n[MD parts] --> [Drupal feed] : book-parts-to-feed\n[MD parts] --> [MD eBook] : book-join\n[MD parts] --> [HTML parts] : pandoc\n[MD eBook] --> [HTML eBook] : pandoc\n[MD eBook] --> [FB2 eBook] : calibre\n[MD eBook] --> [EPUB eBook] : calibre\n[MD eBook] --> [MOBI eBook] : calibre\n\n@enduml\n\n----------------------------------------------------------\n\nComponent diagram 2\n\n@startuml\n\nskinparam component {\n  Style uml2\n  BackgroundColor #FEFECE\n}\nnode "Database Server" {\n  database "MSSQL / ORA \\n " {\n    [DB] as DB\n  }\n}\nnode "Business Logic Server" {\n  frame "Windows Service Host" {\n    package "GUIService" {\n      [GuiService] as GuiService\n    }\n    package "ExtService" {\n      [ExtService] as ExtService\n    }\n  }\n}\nnode "Update Server \\n (can be hosted on \\n BL Server)" {\n  folder "Remote Storage" {\n    [System Storage] as UpdateStorage\n  }\n}\nnode "Client Computer" {\n  folder "Local Storage" {\n    [System Client] as Client\n  }\n}\ncloud "External Systems" {\n  [External Systems] as ExtSystem\n}\n\ncloud "Service Locator" {\n  [Service Locator] as ServiceLocator\n}\ncloud "OSSBSS Services" {\n  [OSSBSS Services] as OSSBSS\n}\ncloud "Security \\n (Authority \\n Service)" {\n  [OSSBSS Security] as Security\n}\n[Client]          --> [GuiService]      : WCF HTTP/TCP\n[ExtSystem]       --> [ExtService]      : WCF HTTP\n[GuiService]      --> [DB]              : OSSBSS.DbAccessLayer\n[GuiService]      --> [UpdateStorage]   : SMB\n[GuiService]      --> [Security]        : WCF\n[GuiService]      --> [ServiceLocator]  : WCF\n[ServiceLocator]  --> [OSSBSS]          : WCF\n[ExtService]      --> [DB]              : OSSBSS.DbAccessLayer\n[ExtService]      ..> [GuiService]      : inproc\n\n@enduml\n\n--------------------------------------------------------------------------------\n\nState diagram\n\n@startuml\n\n[*]       --> proposed  : external \\n request \\n registered in \\n host system\nproposed  --> active    : request \\n accepted\nproposed  --> rejected  : operator \\n rejected \\n request\nproposed  --> cancelled : request \\n cancelled \\n by external \\n system\nactive    --> resolved  : new data \\n assigned\nactive    --> proposed  : request \\n reverted\nactive    --> cancelled : request \\n cancelled \\n by external \\n system \\n or by \\n power-user, \\n data \\n reverted\nactive    --> rejected  : no tech \\n capability\nresolved  --> completed : assigned data \\n confirmed\nresolved  --> active    : in case of correction\nresolved  --> cancelled : assigned data \\n reverted\ncompleted --> [*]\nrejected  --> [*]\ncancelled --> [*]\n\nproposed  : New\nactive    : In Work\nresolved  : Processed\ncompleted : Confirmed\ncancelled : Cancelled\nrejected  : Rejected\n\n@enduml'])]
Rendering diagram for block: '\nComponent diagram 1\n\n@startuml\n\nskinparam componentStyle uml2\n\ncloud "GoogleDocs" {\n  [GDOC docs]\n}\n\n[GDOC docs] --> [DOCX docs] : Download\n[DOCX docs] --> [MD parts] : DocConvert\n[MD parts] --> [Drupal feed] : book-parts-to-feed\n[MD parts] --> [MD eBook] : book-join\n[MD parts] --> [HTML parts] : pandoc\n[MD eBook] --> [HTML eBook] : pandoc\n[MD eBook] --> [FB2 eBook] : calibre\n[MD eBook] --> [EPUB eBook] : calibre\n[MD eBook] --> [MOBI eBook] : calibre\n\n@enduml\n\n----------------------------------------------------------\n\nComponent diagram 2\n\n@startuml\n\nskinparam component {\n  Style uml2\n  BackgroundColor #FEFECE\n}\nnode "Database Server" {\n  database "MSSQL / ORA \\n " {\n    [DB] as DB\n  }\n}\nnode "Business Logic Server" {\n  frame "Windows Service Host" {\n    package "GUIService" {\n      [GuiService] as GuiService\n    }\n    package "ExtService" {\n      [ExtService] as ExtService\n    }\n  }\n}\nnode "Update Server \\n (can be hosted on \\n BL Server)" {\n  folder "Remote Storage" {\n    [System Storage] as UpdateStorage\n  }\n}\nnode "Client Computer" {\n  folder "Local Storage" {\n    [System Client] as Client\n  }\n}\ncloud "External Systems" {\n  [External Systems] as ExtSystem\n}\n\ncloud "Service Locator" {\n  [Service Locator] as ServiceLocator\n}\ncloud "OSSBSS Services" {\n  [OSSBSS Services] as OSSBSS\n}\ncloud "Security \\n (Authority \\n Service)" {\n  [OSSBSS Security] as Security\n}\n[Client]          --> [GuiService]      : WCF HTTP/TCP\n[ExtSystem]       --> [ExtService]      : WCF HTTP\n[GuiService]      --> [DB]              : OSSBSS.DbAccessLayer\n[GuiService]      --> [UpdateStorage]   : SMB\n[GuiService]      --> [Security]        : WCF\n[GuiService]      --> [ServiceLocator]  : WCF\n[ServiceLocator]  --> [OSSBSS]          : WCF\n[ExtService]      --> [DB]              : OSSBSS.DbAccessLayer\n[ExtService]      ..> [GuiService]      : inproc\n\n@enduml\n\n--------------------------------------------------------------------------------\n\nState diagram\n\n@startuml\n\n[*]       --> proposed  : external \\n request \\n registered in \\n host system\nproposed  --> active    : request \\n accepted\nproposed  --> rejected  : operator \\n rejected \\n request\nproposed  --> cancelled : request \\n cancelled \\n by external \\n system\nactive    --> resolved  : new data \\n assigned\nactive    --> proposed  : request \\n reverted\nactive    --> cancelled : request \\n cancelled \\n by external \\n system \\n or by \\n power-user, \\n data \\n reverted\nactive    --> rejected  : no tech \\n capability\nresolved  --> completed : assigned data \\n confirmed\nresolved  --> active    : in case of correction\nresolved  --> cancelled : assigned data \\n reverted\ncompleted --> [*]\nrejected  --> [*]\ncancelled --> [*]\n\nproposed  : New\nactive    : In Work\nresolved  : Processed\ncompleted : Confirmed\ncancelled : Cancelled\nrejected  : Rejected\n\n@enduml'
chdir to: F:\SublimeText\Data\Packages\PlantUmlDiagrams\samples
Error Processing Diagram:
Here are some complex examples

----------------------------------------------------------

Component diagram 1

@startuml

skinparam componentStyle uml2

cloud "GoogleDocs" {
  [GDOC docs]
}

[GDOC docs] --> [DOCX docs] : Download
[DOCX docs] --> [MD parts] : DocConvert
[MD parts] --> [Drupal feed] : book-parts-to-feed
[MD parts] --> [MD eBook] : book-join
[MD parts] --> [HTML parts] : pandoc
[MD eBook] --> [HTML eBook] : pandoc
[MD eBook] --> [FB2 eBook] : calibre
[MD eBook] --> [EPUB eBook] : calibre
[MD eBook] --> [MOBI eBook] : calibre

@enduml

----------------------------------------------------------

Component diagram 2

@startuml

skinparam component {
  Style uml2
  BackgroundColor #FEFECE
}
node "Database Server" {
  database "MSSQL / ORA \n " {
    [DB] as DB
  }
}
node "Business Logic Server" {
  frame "Windows Service Host" {
    package "GUIService" {
      [GuiService] as GuiService
    }
    package "ExtService" {
      [ExtService] as ExtService
    }
  }
}
node "Update Server \n (can be hosted on \n BL Server)" {
  folder "Remote Storage" {
    [System Storage] as UpdateStorage
  }
}
node "Client Computer" {
  folder "Local Storage" {
    [System Client] as Client
  }
}
cloud "External Systems" {
  [External Systems] as ExtSystem
}

cloud "Service Locator" {
  [Service Locator] as ServiceLocator
}
cloud "OSSBSS Services" {
  [OSSBSS Services] as OSSBSS
}
cloud "Security \n (Authority \n Service)" {
  [OSSBSS Security] as Security
}
[Client]          --> [GuiService]      : WCF HTTP/TCP
[ExtSystem]       --> [ExtService]      : WCF HTTP
[GuiService]      --> [DB]              : OSSBSS.DbAccessLayer
[GuiService]      --> [UpdateStorage]   : SMB
[GuiService]      --> [Security]        : WCF
[GuiService]      --> [ServiceLocator]  : WCF
[ServiceLocator]  --> [OSSBSS]          : WCF
[ExtService]      --> [DB]              : OSSBSS.DbAccessLayer
[ExtService]      ..> [GuiService]      : inproc

@enduml

--------------------------------------------------------------------------------

State diagram

@startuml

[*]       --> proposed  : external \n request \n registered in \n host system
proposed  --> active    : request \n accepted
proposed  --> rejected  : operator \n rejected \n request
proposed  --> cancelled : request \n cancelled \n by external \n system
active    --> resolved  : new data \n assigned
active    --> proposed  : request \n reverted
active    --> cancelled : request \n cancelled \n by external \n system \n or by \n power-user, \n data \n reverted
active    --> rejected  : no tech \n capability
resolved  --> completed : assigned data \n confirmed
resolved  --> active    : in case of correction
resolved  --> cancelled : assigned data \n reverted
completed --> [*]
rejected  --> [*]
cancelled --> [*]

proposed  : New
active    : In Work
resolved  : Processed
completed : Confirmed
cancelled : Cancelled
rejected  : Rejected

@enduml
<PlantUmlDiagrams.diagram.sublime3.Sublime3Viewer object at 0x05B5B110> viewing []
@jvantuyl
Copy link
Owner

Hmmmm... I may need to add some better logging. It seems to have identified the diagrams correctly but somehow failed to render them. Perhaps it was a problem running PlantUML? I don't really test on Windows, so it could be a path handling bug. I'll dig into this next week and see if I can find it. If you feel like dropping in some extra error logging, I'd be glad to merge the patch.

@evandrocoan
Copy link
Author

I fixed on my fork by not discarding the stderr output: https://github.com/evandrocoan/PlantUmlDiagrams/blob/8f74601c03f8d485916030c821916fb5de00ba87/diagram/plantuml.py#L131, then handling to display the error message from PlantUML.

Then, I fixed the diagram compilation error on evandrocoan@cfc2440, but I do not know why it needed to do that. Perhaps a bug on PlantUML?

@mom1
Copy link

mom1 commented Jun 28, 2018

Perhaps bug on PlantUML?

Yes.

package "ExtService" {
  [ExtService] as ExtService
}

Try rename to package "EXTService" ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants