VSCODE Reder Errror
rusticrajp opened this issue · 11 comments
Is it possible to render the AWS diagrams in VSCODE? all my other plantuml diagrams render correctly, but I keep getting errors with AWS architecture? Any thing I can try, Thanks.
Yes. Here is a screenshot. I am using java -jar plantuml-mit-1.2023.12.jar -picoweb
to run a local PlantUML server and https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml for rendering.
"plantuml.render": "PlantUMLServer",
"plantuml.server": "http://localhost:8080/plantuml/",
Can you try with https://github.com/awslabs/aws-icons-for-plantuml/blob/main/examples/Basic%20Usage.puml and post a screen shot?
Appreciate the quick response. So In my current test.adoc file, I have a bunch of other diagrams and content. Only the AWS image block is giving error. I understand if you do it in a seperate file it may work.
Check this in VSCODE and you will see the error.
= this i sthe heading
tuheh
== section 1
thetuh is awesome
[plantuml,puml,svg]
@startuml
skin rose
nwdiag {
network home {
address = "192.x.x.x/24"
venus [address = "192.x.x.1"];
mars [address = "192.x.x.2"];
}
}
@enduml
== this is AWS diagram
[plantuml]
@startuml
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v16.0/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/MachineLearning/SageMakerModel.puml
!include AWSPuml/Robotics/RoboMaker.puml
component "$SageMakerModelIMG()" as myMLModel
database "$RoboMakerIMG()" as myRoboticService
RoboMaker(mySecondFunction, "Reinforcement Learning", "Gazebo")
rectangle "$SageMakerModelIMG()" as mySecondML
myMLModel --> myRoboticService
mySecondFunction --> mySecondML
@enduml
== this is kroki
[plantuml]
nwdiag {
network dmz {
address = "210.x.x.x/24"
web01 [address = "210.x.x.1"];
web02 [address = "210.x.x.2"];
}
network internal {
address = "172.x.x.x/24";
web01 [address = "172.x.x.1"];
web02 [address = "172.x.x.2"];
db01;
db02;
}
}
== this is mermaid
[mermaid]
sequenceDiagram
participant Alice
participant Bob
Alice->John: Hello John, how are you?
loop Healthcheck
John->John: Fight against hypochondria
end
Note right of John: Rational thoughts prevail...
John-->Alice: Great!
John->Bob: How about you?
Bob-->John: Jolly good!
== this is gantt chart
[mermaid]
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1, 20d
section Another
Task in sec :2014-01-12, 12d
another task :24d
[plantuml, aws-sdk-plantuml, format=png]
@startuml Hello World
'Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
'SPDX-License-Identifier: MIT (For details, see https://github.com/awslabs/aws-icons-for-plantuml/blob/master/LICENSE)
' Uncomment the line below for "dark mode" styling
'!$AWS_DARK = true
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v16.0/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/BusinessApplications/all.puml
!include AWSPuml/Storage/SimpleStorageService.puml
actor "Person" as personAlias
WorkDocs(desktopAlias, "Label", "Technology", "Optional Description")
SimpleStorageService(storageAlias, "Label", "Technology", "Optional Description")
personAlias --> desktopAlias
desktopAlias --> storageAlias
@enduml
- What is rendering
test.adoc
? - What PlantUML version? (e.g. add
title %version()
to a diagram)
- rename the above test.txt to test.adoc and open in vscode.
- I'm using Kroki to render
- if you install the asciidoc extension, you can preview the asciidoc side by side
You can see the AWS section is giving error
where should I add the version?
You can see the Error 400 for the contents in test.txt file.
If I just use only PLANTUML code without any other Asciidoc markup, I'm able to preview using ALT+D in Windows without issues.
May be this cannot be rendered along side with ascidoc.
I also get an error on https://kroki.io/ (which title %version()
renders as 1.2023.11
)
Error 400: Syntax Error? (line: 15)
Somehow it doesn't like these lines of code which official plantuml.jar
does.
IoTRule(iotRule, "Action Error Rule", "error if Kinesis fails")
KinesisDataStreams(eventStream, "IoT Events", "2 shards")
SimpleQueueService(errorQueue, "Rule Error Queue", "failed Rule actions")
ok thanks for trying. I can always render is separately and copy the image.