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

Exception Error - "dot" not found in path. #64

Open
Marct27 opened this issue Nov 20, 2020 · 2 comments
Open

Exception Error - "dot" not found in path. #64

Marct27 opened this issue Nov 20, 2020 · 2 comments

Comments

@Marct27
Copy link

Marct27 commented Nov 20, 2020

Issues when running this on OSX and Windows, have tried with Python 3.6.8 and 3.9.x

natlas v0.12.1
Michael Laforest <mjlaforest@gmail.com>
Python 3.6.8

     Config file: ./natlas.conf
     Output file: .\network.svg
Out Catalog file: None
       Root node: 192.168.146.254
  Discover depth: 100
   Diagram title: natlas Diagram

Discovery codes:
    . depth             ! connection error
    + discovering node  > numerating adjacencies
    i include node      L leaf node

Discovering network...
1  [root]  +UnifiSwitch16PoE (192.168.146.254)
   [root]  >UnifiSwitch16PoE (192.168.146.254)

Collecting node details...
[1/1]+ UnifiSwitch16PoE (192.168.146.254) 0.78 sec

Back filling node details...
Traceback (most recent call last):
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\site-packages\pydot.py", line 1915, in create
    working_dir=tmp_dir,
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\site-packages\pydot.py", line 136, in call_graphviz
    **kwargs
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 1017, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\PythonProjects\natlas\natlas-cli.py", line 305, in <module>
    main(sys.argv[1:])
  File "E:\PythonProjects\natlas\natlas-cli.py", line 96, in main
    exec_mod(mod, argv[1:])
  File "E:\PythonProjects\natlas\natlas-cli.py", line 167, in exec_mod
    modret = module.entryfunc(natlas_obj, argv)
  File "./modules\diagram.py", line 88, in mod_entry
    if (opt_output != None):    natlas_obj.write_diagram(opt_output, opt_title)
  File "E:\PythonProjects\natlas\natlas\natlas.py", line 125, in write_diagram
    self.diagram.generate(output_file, diagram_title)
  File "E:\PythonProjects\natlas\natlas\output_diagram.py", line 108, in generate
    output_func(f)
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\site-packages\pydot.py", line 1734, in new_method
    encoding=encoding)
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\site-packages\pydot.py", line 1817, in write
    s = self.create(prog, format, encoding=encoding)
  File "C:\Users\marc\AppData\Local\Programs\Python\Python36\lib\site-packages\pydot.py", line 1922, in create
    raise OSError(*args)
FileNotFoundError: [WinError 2] "dot" not found in path.```
@marcolussetti
Copy link

This library requires Graphiviz's dot executable to be installed and in the path.

On most Linux distro the package manage would serve it.

On Mac OS X homebrew will install it just fine:

brew install graphviz

On Windows you'll want to get the upstream installer and add it to your path (or just use WSL).

@kacesensitive
Copy link

On windows install Grpahviz then add dot to your path "ProgramFiles/Graphviz/bin"

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