davevs / pySCS

Security Control Selector
MIT License
3 stars 0 forks source link

Error invoking sample model provided #11

Open gamorvi opened 5 years ago

gamorvi commented 5 years ago

python3 pySCS.py models/sample/

Processing: models/sample/model.py Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 1915, in create working_dir=tmp_dir, File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 136, in call_graphviz **kwargs File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in init restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.6/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 "pySCS.py", line 592, in exec(open(model_file).read()) File "", line 57, in File "pySCS.py", line 269, in process self.dfd() File "pySCS.py", line 283, in dfd output_dfd() File "pySCS.py", line 239, in output_dfd dfd_in_progress.write_png(dfd_file) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 1734, in new_method encoding=encoding) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 1817, in write s = self.create(prog, format, encoding=encoding) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 1922, in create raise OSError(*args) FileNotFoundError: [Errno 2] "dot" not found in path.

davevs commented 5 years ago

pySCS uses pydot which uses dot which is part of the Graphviz package. So the key is make sure Graphviz is installed and python can find it. Personally I use Anaconda which has all dependencies already in place.