You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an AppRegistryNotReady error when trying to set up vulntotal using Docker. This issue arises at the final step when running vulntotal --help.
Upon investigating, I found that the root cause is an import statement in github.py, which tries to import from vulnerabilities import utils. Specifically, vulnerabilities.utils contains the line from packageurl.contrib.django.models import without_empty_values, which seems to trigger the error. It appears that vulntotal's operation is being impeded by its dependency on Django's app loading state.
Expected Behavior
I expected to be able to run vulntotal --help without encountering an AppRegistryNotReady error, regardless of the Django app's state.
Actual Behavior
An AppRegistryNotReady error is raised due to an import statement dependent on Django being fully initialized.
Possible Solution
It might be beneficial to refactor the code to remove the dependency on Django's app loading state, especially for utility scripts like vulntotal that should ideally operate independently.
The text was updated successfully, but these errors were encountered:
Upon investigating, I found that the root cause is an import statement in github.py, which tries to import from vulnerabilities import utils. Specifically, vulnerabilities.utils contains the line from packageurl.contrib.django.models import without_empty_values, which seems to trigger the error. It appears that vulntotal's operation is being impeded by its dependency on Django's app loading state.
Description
I encountered an
AppRegistryNotReady
error when trying to set up vulntotal using Docker. This issue arises at the final step when runningvulntotal --help
.Steps to Reproduce
docker-compose up
to start the services.docker-compose exec vulnerablecode pip install -r requirements.txt
to install Python dependencies.docker-compose exec vulnerablecode pip install -e .
to install the current package.docker-compose exec vulnerablecode vulntotal --help
to check if vulntotal was correctly set up.At the last step, I encountered the following error:
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Upon investigating, I found that the root cause is an import statement in
github.py
, which tries to import fromvulnerabilities import utils
. Specifically,vulnerabilities.utils
contains the linefrom packageurl.contrib.django.models import without_empty_values
, which seems to trigger the error. It appears that vulntotal's operation is being impeded by its dependency on Django's app loading state.Expected Behavior
I expected to be able to run
vulntotal --help
without encountering anAppRegistryNotReady
error, regardless of the Django app's state.Actual Behavior
An
AppRegistryNotReady
error is raised due to an import statement dependent on Django being fully initialized.Possible Solution
It might be beneficial to refactor the code to remove the dependency on Django's app loading state, especially for utility scripts like
vulntotal
that should ideally operate independently.The text was updated successfully, but these errors were encountered: