stathissideris / ditaa

ditaa is a small command-line utility that can convert diagrams drawn using ascii art ('drawings' that contain characters that resemble lines like | / - ), into proper bitmap graphics.
GNU Lesser General Public License v3.0
924 stars 87 forks source link

Sphinx (1.7.9) html build of .rst doc-n (with '.. ditaa::' directive) fails with undescriptive exception error if the path to 'ditaa_.jar' in conf.py is invalid (or the ditaa exec cannot be found otherwise) #61

Open Ts-OV opened 4 years ago

Ts-OV commented 4 years ago

If there is .. ditaa:: directive used in .rst documentation collection (that is tried to be built into html one) and something goes wrong with finding Ditaa java executable, the whole Sphinx build process crashes with unhandled exception:

Exception occurred:
File "/home/path/to/sphinx_1.7.9/local/lib/python2.7/site-packages/sphinxcontrib/ditaa.py", line 151, in render_ditaa
   if err.errno != ENOENT: # No such file or directory
NameError: global name 'ENOENT' is not defined

It is more or less clearly described how to set it up manually, but installing the extension (pip install sphinxcontrib-ditaa) doesn't automatically lead to working environment with the settings offered:

ditaa = "java"
ditaa_args = ["-jar", "/usr/local/Cellar/ditaa/0.10/libexec/ditaa0_10.jar"]

and for a person, who has no idea what could have gone wrong there, this kind of error message for the issue is totally undescriptive (in addition to the fact that such the exception should not be left unhandled)

Also, the official Ditaa source page [http://ditaa.sourceforge.net/] mentions links to hosted latest ver.0.9 of ditaa0_9.jar from here. From where this 0.10-th ver. /usr/local/Cellar/ditaa/0.10/libexec/ditaa0_10.jar does come from? There are no valid links on the extension page that would lead to it.

Cilyan commented 2 years ago

I'm faced with the same issue, however the problem may even be bigger than this. I doubt that this is the real repository of the sphinx extension, nor the right place to report issues there. It seems that the PyPI user ypguo (behind sphinxcontrib-ditaa) had a bad habit to link his work to the website of the original software that his plugins wraps instead of the website that hosts his own code. Doing this, there is no way to trace where the code really comes from, and apparently this is not from here. We hit here a major issue of PyPI...

akaihola commented 2 years ago

I tried to find where the PyPI package comes from, and here are some traces:

akaihola commented 1 year ago

I created #77 for continuing the effort of sorting out the Sphinx extension mess. Let's continue that discussion there.