Open GabrielDumbrava opened 1 year ago
If I change the path to the dot to /usr/bin/dot
which is the place where the bash shell finds it then I get the same error, File does not exist
. Upon further investigation I see that IntelliJ is using /bin/sh
as shell whereas PyCharm uses /bin/bash
. If I try to find /usr/bin/dot
with sh
the I get no file with that name.
On bash
it's a link to /usr/bin/dot -> ../sbin/libgvc6-config-update*
, so this might be a difference between the two apps.
I'm having a very similar issue with Android Studio.
Seems to work fine if I have a single class in a diagram:
But if I add a second class it breaks with the same error:
I have the correct graphwiz location set in PlantUML settings: /opt/homebrew/bin/dot
.
I also tried setting the global variable GRAPHVIZ_DOT
in my bash_profile as a last resort.
From the logs:
2023-02-21 13:30:49,134 [4857496] INFO - STDERR - java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
2023-02-21 13:30:49,134 [4857496] INFO - STDERR - at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
2023-02-21 13:30:49,134 [4857496] INFO - STDERR - at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
2023-02-21 13:30:49,134 [4857496] INFO - STDERR - at java.base/java.lang.Runtime.exec(Runtime.java:594)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:163)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:123)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:79)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - Caused by: java.io.IOException: error=2, No such file or directory
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - ... 5 more
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.Runtime.exec(Runtime.java:594)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:163)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:123)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:79)
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - Caused by: java.io.IOException: error=2, No such file or directory
2023-02-21 13:30:49,135 [4857497] INFO - STDERR - at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
2023-02-21 13:30:49,136 [4857498] INFO - STDERR - at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
2023-02-21 13:30:49,136 [4857498] INFO - STDERR - at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
2023-02-21 13:30:49,136 [4857498] INFO - STDERR - at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
2023-02-21 13:30:49,136 [4857498] INFO - STDERR - ... 5 more
Android Studio Flamingo | 2022.2.1 Beta 2 Build #AI-222.4459.24.2221.9526055, built on January 25, 2023 Runtime version: 17.0.5+7-b469.71 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Isn't there some permission problem? Does it work directly from the IDE's terminal? https://plantuml.com/command-line
A single class in a diagram works because it does not use Graphviz.
What does this show?
@startuml
testdot
@enduml
A single class in a diagram works because it does not use Graphviz.
What does this show?
@startuml testdot @enduml
activity-diagram is ok, object-diagram don't work
@REBOOTERS That did not work, because of a configured skin. Try this:
Is it still broken? It should be fixed with 1.2023.8 But if the configured path (in the plugin settings dialog) did not work before, then I doubt that it will help.
I did take a second look and I have a few more details. First the PyCharm (left) and IntelliJ (right) configurations are the same:
One difference between them is that IntelliJ is using sh
as shell and the file owners seem to be completely different than the ones on the system, and as seen by PyCharm.
IntelliJ can't find /usr/bin/dot
and the file owner is nfsnobody.nfsnobody
as you can see bellow:
PyCharm correctly, and using bash
, can access the file:
Also the locale is different on IntelliJ than with PyCharm, even if I did a complete reset of IntelliJ settings.
It seems that the plugin is not working properly on IntelliJ, but works perfectly on PyCharm.
Here is a comparison of the two, with the IntelliJ on the left and pycharm on the right:
If I remove the second object from the IntelliJ definition then the code is rendered properly:![2023-02-13_11-44_1](https://user-images.githubusercontent.com/2076656/218427463-8856e287-cfec-449f-91a2-48a3841be495.png)
I'm using the same plugin version and the same configuration on the same Ubuntu 22.04 machine.![2023-02-13_11-46](https://user-images.githubusercontent.com/2076656/218428289-7c698089-dcb7-4552-b443-a8ca8da0322b.png)