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

FileNotFoundError: [Errno 2] "dot" not found in path. #41

Open
Abed1985 opened this issue Feb 19, 2019 · 4 comments
Open

FileNotFoundError: [Errno 2] "dot" not found in path. #41

Abed1985 opened this issue Feb 19, 2019 · 4 comments

Comments

@Abed1985
Copy link

Getting this error with every IP I try..

abooda@xx:~/Network-Discovery/natlas$ python3 natlas-cli.py diagram -r 10.168.4.17 -o .\network.svg
natlas v0.12.1
Michael Laforest [email protected]
Python 3.6.7

 Config file: ./natlas.conf
 Output file: .network.svg

Out Catalog file: None
Root node: 10.168.4.17
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] +architec_bourkest_fo_dsl_vpn (10.168.4.17)
[root] >architec_bourkest_fo_dsl_vpn (10.168.4.17)

Collecting node details...
[1/1]+ architec_bourkest_fo_dsl_vpn (10.168.4.17) 3.07 sec

Back filling node details...
Traceback (most recent call last):
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1915, in create
working_dir=tmp_dir,
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 136, in call_graphviz
**kwargs
File "/usr/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, 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 "natlas-cli.py", line 305, in
main(sys.argv[1:])
File "natlas-cli.py", line 96, in main
exec_mod(mod, argv[1:])
File "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 "/home/abooda/Network-Discovery/natlas/natlas/natlas.py", line 125, in write_diagram
self.diagram.generate(output_file, diagram_title)
File "/home/abooda/Network-Discovery/natlas/natlas/output_diagram.py", line 108, in generate
output_func(f)
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1734, in new_method
encoding=encoding)
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1817, in write
s = self.create(prog, format, encoding=encoding)
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1922, in create
raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path.

@zearthlink
Copy link

Hi,

I had the same problem. Install graphviz through apt/yum/dnf (sudo apt install graphviz). This fixed the problem for me.

Regards

@Abed1985
Copy link
Author

Abed1985 commented Mar 3, 2019

Thanks for your reply . I have graphiz installed. I tried the script one more time , when its about to finish I get this winerror :

Back filling node details...
Traceback (most recent call last):
File "C:\Users\Abooda\PycharmProjects\Network Discovery\venv\lib\site-packages\pydot.py", line 1915, in create
working_dir=tmp_dir,
File "C:\Users\Abooda\PycharmProjects\Network Discovery\venv\lib\site-packages\pydot.py", line 136, in call_graphviz
**kwargs
File "C:\Users\Abooda\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 756, in init
restore_signals, start_new_session)
File "C:\Users\Abooda\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 1155, 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 "natlas-cli.py", line 305, in
main(sys.argv[1:])
File "natlas-cli.py", line 96, in main
exec_mod(mod, argv[1:])
File "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 "C:\Users\Abooda\PycharmProjects\Network Discovery\natlas\natlas.py", line 125, in write_diagram
self.diagram.generate(output_file, diagram_title)
File "C:\Users\Abooda\PycharmProjects\Network Discovery\natlas\output_diagram.py", line 108, in generate
output_func(f)
File "C:\Users\Abooda\PycharmProjects\Network Discovery\venv\lib\site-packages\pydot.py", line 1734, in new_method
encoding=encoding)
File "C:\Users\Abooda\PycharmProjects\Network Discovery\venv\lib\site-packages\pydot.py", line 1817, in write
s = self.create(prog, format, encoding=encoding)
File "C:\Users\Abooda\PycharmProjects\Network Discovery\venv\lib\site-packages\pydot.py", line 1922, in create
raise OSError(*args)
FileNotFoundError: [WinError 2] "dot" not found in path.

@Abed1985
Copy link
Author

Abed1985 commented Mar 3, 2019

also installed pydot , and trying on another network , getting this

abooda@bne-mns-dev-01:/Network-Discovery/natlas$ pip3 install pydot
Collecting pydot
Using cached https://files.pythonhosted.org/packages/33/d1/b1479a770f66d962f545c2101630ce1d5592d90cb4f083d38862e93d16d2/pydot-1.4.1-py2.py3-none-any.whl
Collecting pyparsing>=2.1.4 (from pydot)
Using cached https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl
Installing collected packages: pyparsing, pydot
Successfully installed pydot-1.4.1 pyparsing-2.3.1
abooda@bne-mns-dev-01:
/Network-Discovery/natlas$ python3 natlas-cli.py diagram -r 10.162.63.1 -o .\network.svg
natlas v0.12.1
Michael Laforest [email protected]
Python 3.6.7

 Config file: ./natlas.conf
 Output file: .network.svg

Out Catalog file: None
Root node: 10.162.63.1
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] +C3750_Core (10.162.63.1)
[root] >C3750_Core (10.162.63.1)
2 [ cdp] !+.MRC_SW_03 (10.48.0.103)
3 [ cdp] !+.MRC_SW_22 (10.48.0.122)
4 [ cdp] !+.MRC_SW_21 (10.48.0.121)

Collecting node details...
[1/4]+ C3750_Core (10.162.63.1) 6.51 sec
[2/4]! MRC_SW_03 (10.48.0.103) 0.00 sec
[3/4]! MRC_SW_22 (10.48.0.122) 0.00 sec
[4/4]! MRC_SW_21 (10.48.0.121) 0.00 sec

Back filling node details...
Traceback (most recent call last):
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1915, in create
working_dir=tmp_dir,
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 136, in call_graphviz
**kwargs
File "/usr/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, 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 "natlas-cli.py", line 305, in
main(sys.argv[1:])
File "natlas-cli.py", line 96, in main
exec_mod(mod, argv[1:])
File "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 "/home/abooda/Network-Discovery/natlas/natlas/natlas.py", line 125, in write_diagram
self.diagram.generate(output_file, diagram_title)
File "/home/abooda/Network-Discovery/natlas/natlas/output_diagram.py", line 108, in generate
output_func(f)
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1734, in new_method
encoding=encoding)
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1817, in write
s = self.create(prog, format, encoding=encoding)
File "/home/abooda/.local/lib/python3.6/site-packages/pydot.py", line 1922, in create
raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path.

@jordanrvillarreal
Copy link

I ran into this on Windows. Essentially dot wasn't in the path. In Windows I needed to add "C:\Program Files (x86)\Graphviz2.38\bin" to my path after installing Graphviz. I tried installing Graphviz through pip and it wasn't getting the job done. Directly downloaded from them then pointed to the path where "dot" resides. I'd imagine the issue and solution is the same on Linux.

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