Skip to content

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

@Ts-OV

Description

@Ts-OV

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions