MJL85 / natlas

natlas - Network Discovery and Auto-Diagramming
GNU General Public License v2.0
524 stars 114 forks source link

Working dir error #26

Closed fatman00 closed 6 years ago

fatman00 commented 6 years ago

I get the following error when I try to run natlas-cli both on windows and Linux. If i change os.listdir on line 119 to only contain './modules' everything works.

rael@fw:~/natlas$ python3 natlas-cli.py diagram -r 10.10.0.1 -o test.svg
natlas v0.11-dev6
Michael Laforest <mjlaforest@gmail.com>
Python 3.6.5

Traceback (most recent call last):
  File "natlas-cli.py", line 306, in <module>
    main(sys.argv[1:])
  File "natlas-cli.py", line 76, in main
    modules = load_modules()
  File "natlas-cli.py", line 119, in load_modules
    for f in os.listdir(working_dir + '/modules'):
FileNotFoundError: [Errno 2] No such file or directory: '/modules'
rael@fw:~/natlas$ ls
CHANGELOG  LICENSE      modules  natlas-cli.py  README.md
docs       MANIFEST.in  natlas   natlas.conf    setup.py
rael@fw:~/natlas$

Great tool by the way.

fatman00 commented 6 years ago

Got this to work when i changed "for f in os.listdir(working_dir + '/modules'):" to "for f in os.listdir('./modules'):"

MJL85 commented 6 years ago

patched 0.12.1