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

Fixes #312 : Added solution for ModuleNotFoundError #427

Merged
merged 3 commits into from
Apr 5, 2021

Conversation

Pushpit07
Copy link
Contributor

Added commands to run in case of running into a ModuleNotFoundError

Signed-off-by: Pushpit [email protected]

@Pushpit07 Pushpit07 changed the title Added solution for ModuleNotFoundError Fixes #312 : Added solution for ModuleNotFoundError Apr 4, 2021
Copy link
Collaborator

@sbs2001 sbs2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a better solution to solve all such problems, see my comment inline.

README.rst Outdated
@@ -106,6 +106,12 @@ compose. For this you need to have the following installed.
Use ``sudo docker-compose up`` to start VulnerableCode. Then access
VulnerableCode at http://localhost:8000/ or at http://127.0.0.1:8000/

If you run into a ``ModuleNotFoundError: No module named '<module>'``, run::
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make this more general.

The root cause of problem here is that after upgrading the code, the docker setup is not synced ie new migrations, deps are not applied.

So a better solution to fix all such problems would be to do
sudo docker-compose up -d --no-deps --build web

So I would change this to something like

Don't forget to run `sudo docker-compose up -d --no-deps --build web` to sync your instance after every `git pull`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, great. Running this will sync the docker environment each time the codebase updates

README.rst Outdated
@@ -106,6 +106,9 @@ compose. For this you need to have the following installed.
Use ``sudo docker-compose up`` to start VulnerableCode. Then access
VulnerableCode at http://localhost:8000/ or at http://127.0.0.1:8000/

**Important**: Don't forget to run `sudo docker-compose up -d --no-deps --build web` to sync your instance after every `git pull`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to enclose the command in 2 tildes

@sbs2001 sbs2001 merged commit f254b0d into aboutcode-org:main Apr 5, 2021
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

Successfully merging this pull request may close these issues.

2 participants