Issue with running Make (No module named 'attack_flow')
JitBox opened this issue · 7 comments
Hey all, I have been attempting to get started with this project and used this step by step: https://github.com/center-for-threat-informed-defense/attack-flow
Here are the steps I have done:
- cloned the repo: https://github.com/center-for-threat-informed-defense/attack-flow
- ran the following commands in the folder of the cloned repo:
- python3 -m venv .venv
- source .venv/bin/activate
- pip install -r requirements/requirements.txt
- pip install -r requirements/test-requirements.txt
- make
Once I run make, I get an error saying "Error while finding module specification for 'attack_flow.scripts.validate_doc' (ModuleNotFoundError: No module named 'attack_flow')
make: *** [precommit] Error 1"
What am I doing wrong?
Also, I see that you can load in .afd files in the index.html to design a flow, and also make your own. You can publish these as .json to be ran, but what folder must these .json flows live in to be ran? Is it ran with the make command from above?
Hi @JitBox, it looks like the documentation is missing an important step. After running pip install -r requirements/test-requirements.txt
, please try running pip install -e .
and then try make
again. Please let me know if this solves the problem. I've opened PR #51 to update the README.
We are releasing an updated Attack Flow in October that has completely revamped technical documentation.
Hi @mehaase , it looks like pip install -e needs something after it. I am getting this when attempting to run:
Do you know what argument I should add to that command?
Disregard, I see the "." at the end. Sorry about that.
Ahh okay, let's try something different then. When you get into the virtual env, from the project root folder run this export command before make:
(.venv) $ export PYTHONPATH="$PWD/src"
(.venv) $ make
...
I gave you bad advice with the pip install -e .
stuff ... sorry about that, I've been switching back and forth between Attack Flow 1 and Attack Flow 2 and the CLI is a bit different between them.
@JitBox I believe this issue (and a lot of other developer experience issues) are resolved in the v2 release from last week. Please let me know if this resolves the issue for you.
Closing due to inactivity. Please reopen if it's still a problem.