mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
192 stars 55 forks source link

Failed to run plantuml #6

Closed cyqluowang closed 5 years ago

cyqluowang commented 6 years ago
Traceback (most recent call last):
  File "/usr/local/bin/markdown_py", line 34, in <module>
    run()
  File "/Library/Python/2.7/site-packages/markdown/__main__.py", line 130, in run
    markdown.markdownFromFile(**options)
  File "/Library/Python/2.7/site-packages/markdown/__init__.py", line 529, in markdownFromFile
    kwargs.get('encoding', None))
  File "/Library/Python/2.7/site-packages/markdown/__init__.py", line 441, in convertFile
    html = self.convert(text)
  File "/Library/Python/2.7/site-packages/markdown/__init__.py", line 371, in convert
    root = self.parser.parseDocument(self.lines).getroot()
  File "/Library/Python/2.7/site-packages/markdown/blockparser.py", line 65, in parseDocument
    self.parseChunk(self.root, '\n'.join(lines))
  File "/Library/Python/2.7/site-packages/markdown/blockparser.py", line 80, in parseChunk
    self.parseBlocks(parent, text.split('\n\n'))
  File "/Library/Python/2.7/site-packages/markdown/blockparser.py", line 98, in parseBlocks
    if processor.run(parent, blocks) is not False:
  File "/Library/Python/2.7/site-packages/markdown/extensions/plantuml.py", line 97, in run
    diagram = self.generate_uml_image(text, imgformat)
  File "/Library/Python/2.7/site-packages/markdown/extensions/plantuml.py", line 140, in generate_uml_image
    raise Exception('Failed to run plantuml: %s' % exc)
Exception: Failed to run plantuml: [Errno 20] Not a directory
::uml:: format="png" classes="umlmyDiagram" alt="Mydiagram"

    Goofy ->  MickeyMouse: calls
    Goofy <-- MickeyMouse: responds

::end-uml::
mikitex70 commented 6 years ago

Maybe a Python incompatibility... What version of Python are you using? And what OS? Have you installed plantuml? This plugin expects a plantuml executable on the path and from your stack trace it seems it cannot be found.

cyqluowang commented 6 years ago
Python 2.7.13 (default, Dec 18 2016, 07:03:39)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

os:mac 10.12.6

yes. installed
mikitex70 commented 6 years ago

I've build a dockerized test environment and I was able to reproduce the problem: the plantuml executable is not found on the path. From a console try the command plantuml (without parameters): it should open a window that let you choose a file containing diagrams and to render it. If the window doesn't open than there is an installation problem.

mikitex70 commented 5 years ago

Closing since there is no further information.