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

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 this issue Apr 21, 2020 · 3 comments

Comments

@Ts-OV
Copy link

Ts-OV commented Apr 21, 2020

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.

@Ts-OV Ts-OV changed the title 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 found otherwise) 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) Apr 21, 2020
@Cilyan
Copy link

Cilyan commented Mar 15, 2022

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
Copy link

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

  • sdelisle25/sphinxcontrib-ditaa on GitHub, last updated 7 Jul 2017, forked from baloo/sphinx-ditaa, and has this at the top:
    sphinx.ext.ditaa
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Allow ditaa-formatted graphs to by included in Sphinx-generated
    documents inline.
    
    :copyright: Copyright 2011 by Arthur Gautier
    :copyright: Copyright 2011 by Zenexity
    :license: BSD, see LICENSE for details.
  • baloo/sphinx-ditaa on GitHub, last updated 15 Oct 2017 (for which I've opened PR Fixes #14: Directive now imported directly from docutils.parsers.rst baloo/sphinx-ditaa#15 back in Apr 2018), and has this at the top:
    sphinx.ext.ditaa
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Allow ditaa-formatted graphs to by included in Sphinx-generated
    documents inline.
    :copyright: Copyright 2011 by Arthur Gautier
    :copyright: Copyright 2011 by Zenexity
    :license: BSD, see LICENSE for details.
  • the ditaa.py file in the sphinxcontrib-ditaa PyPI package has this at the top:
    sphinxcontrib.ditaa
    ~~~~~~~~~~~~~~~~~~~~~
    
    Allow ditaa commands be rendered as nice looking images
      
    
    See the README file for details.
    
    :author: Vadim Gubergrits <[email protected]>
    :license: BSD, see LICENSE for details
    
    Inspired by ``sphinxcontrib-aafig`` by Leandro Lucarella.
  • in the sphinx-contrib GitHub organization, there's also a gnuplot extension from the same author

@akaihola
Copy link

akaihola commented Mar 2, 2023

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

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

3 participants