hjalti / mossum

Moss summarizer
MIT License
188 stars 27 forks source link

[Errno 2] "dot" not found in path #7

Open jmoeyersons opened 4 years ago

jmoeyersons commented 4 years ago

When testing mossum for the first time, I've always got the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pydot.py", line 1915, in create
    working_dir=tmp_dir,
  File "/usr/local/lib/python3.7/site-packages/pydot.py", line 136, in call_graphviz
    **kwargs
  File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/mossum", line 9, in <module>
    mossum.main()
  File "/usr/local/lib/python3.7/site-packages/mossum/mossum.py", line 291, in main
    image(res, i+1)
  File "/usr/local/lib/python3.7/site-packages/mossum/mossum.py", line 262, in image
    graph.write(filename, format=args.format)
  File "/usr/local/lib/python3.7/site-packages/pydot.py", line 1817, in write
    s = self.create(prog, format, encoding=encoding)
  File "/usr/local/lib/python3.7/site-packages/pydot.py", line 1922, in create
    raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path.

Apparantly, installing graphviz on Macos (brew install graphviz) or Linux distributions (apt-get install graphviz) will fix this issue (Not tested on Windows)

siniar1990 commented 4 years ago

I had similar issue, but I can confirm installing graphviz with brew on Mac solve this issue.

bykhov commented 3 years ago

I confirm installing graphviz on Windows (https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224) resolve the issue.