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

Warning while building docs containing plantuml diagram #19

Open
Ashyglim opened this issue Oct 5, 2018 · 6 comments
Open

Warning while building docs containing plantuml diagram #19

Ashyglim opened this issue Oct 5, 2018 · 6 comments

Comments

@Ashyglim
Copy link

Ashyglim commented Oct 5, 2018

Thank you for developing this plugin!

I met a problem where no diagrams are correctly created while building docs using sphinx.
The log gave the warning as the following:
WARNING: plantuml command 'plantuml' cannot be run

The build succeeded but no diagram were created.
I have already setup a batch file which contains running script of plantuml.jar and set the path to the batch file as an environment variable. But this problem is still there.

The full log is as the following:

sphinx-build -b html ./ ../../../build
Running Sphinx v1.8.1
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 89 source files that are out of date
updating environment: 89 added, 0 changed, 0 removed
plaatje ageCropper tializer
reading sources... [100%] training/index xPreprocessor
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
c:\users\xuchen\appdata\local\programs\python\python37-32\lib\site-packages\sphinx\application.py:388: RemovedInSphinx20Warning: app.warning() is now deprecated. Use sphinx.util.logging instead.
RemovedInSphinx20Warning)
writing output... [100%] training/index
WARNING: plantuml command 'plantuml' cannot be run
WARNING: plantuml command 'plantuml' cannot be run
generating indices... genindex py-modindex
writing additional pages... search
copying images... [ 48%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/1_licht_crop/1_licht_crop_histogram_grcopying images... [ 49%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/1_gradient_crop/1_gradient_crop_histogcopying images... [ 50%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/1_middel_donker_crop/1_middel_donker_ccopying images... [ 51%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/1_licht_crop/1_licht_crop_hoog_contrascopying images... [ 52%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/1_gradient_crop/1_gradient_crop_hoog_ccopying images... [ 53%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/1_middel_donker_crop/1_middel_donker_ccopying images... [ 57%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_licht_crop/8x8_licht_crop_histogracopying images... [ 58%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_spots_crop/8x8_spots_crop_histogracopying images... [ 59%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_heel_donker_crop/8x8_heel_donker_ccopying images... [ 60%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_licht_crop/8x8_licht_crop_hoog_concopying images... [ 61%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_spots_crop/8x8_spots_crop_hoog_concopying images... [ 62%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_heel_donker_crop/8x8_heel_donker_ccopying images... [ 67%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_licht_crop/8x8_licht_crop_thresholcopying images... [ 68%] teams\2017.3_DuoPiNotti./img/normalisatie/multi_display/8x8_licht_crop/8x8_licht_crop_thresholcopying images... [100%] teams\2018.1_sPYnkenHof\img/logo.jpg ning.jpg
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 2 warnings.

The HTML pages are in ......\build.

@yuja
Copy link
Collaborator

yuja commented Oct 6, 2018

Windows batch file runs quite differently than a normal command.
You'll probably need to specify plantuml = ['cmd.exe', '/c', path_to_batch_file],
or simply embed the batchfile content into plantuml = [...].

@Ashyglim
Copy link
Author

Thank you for the reply!
In the usage I saw it could be done in Unix to specify plantuml command that

puts wrapper script in your PATH

I was wondering if there is a way to do this in windows too.

@yuja
Copy link
Collaborator

yuja commented Oct 10, 2018

could be done in Unix to specify plantuml

Yep, Unix shell scripts can work exactly in the same semantics as compiled executables.

if there is a way to do this in windows

I'm not a Windows nor Java person, but maybe you can build an exe wrapper?

https://www.google.com/search?q=make+java+win32+executable

@Ashyglim
Copy link
Author

Thank you!

The problem has been solved by modifying the setup function in plantuml.py
Not a clean solution but it got to the goal without modifying conf.py, which is a hard requirement here.

@CTimmerman
Copy link

My fix on Windows 10:

  • In make.bat: set SOURCEDIR=.
  • Add plantuml.bat next to make.bat: java -jar C:\Users\Cees\AppData\Roaming\JetBrains\PyCharm2020.3\plugins\plantuml4idea\lib\plantuml.1.2021.0.jar %*

@maciejskorski
Copy link

maciejskorski commented Mar 24, 2023

install plantuml from shell.

demonstrated to work on CI/CD of my university class docs, Linux environment (also locally on MacOS).

with sphinx extensions installed (pip) and configured (conf) it runs and renders correctly.

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

No branches or pull requests

4 participants