Warning while building docs containing plantuml diagram
Ashyglim opened this issue · 6 comments
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.
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 = [...]
.
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.
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?
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.
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 %*
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.