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

Production:ModuleNotFoundError: No module named 'debug_toolbar' #65

Open
NagarjunaKuchi opened this issue Feb 3, 2023 · 4 comments
Open
Assignees

Comments

@NagarjunaKuchi
Copy link

We are installing the app in the production. While installing we are getting the following error. But in the production.yml there is no app for debug_toolbar.

django config in .envs/.production/.django

General

------------------------------------------------------------------------------

USE_DOCKER=yes
IPYTHONDIR=/app/.ipython

Any thing am i missing here. Below is the complete error stack. new to python ```

idpass-card-generator-django-1 | Traceback (most recent call last):
idpass-card-generator-django-1 | File "/app/manage.py", line 31, in
idpass-card-generator-django-1 | execute_from_command_line(sys.argv)
idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
idpass-card-generator-django-1 | utility.execute()
idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 420, in execute
idpass-card-generator-django-1 | django.setup()
idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/init.py", line 24, in setup
idpass-card-generator-django-1 | apps.populate(settings.INSTALLED_APPS)
idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
idpass-card-generator-django-1 | app_config = AppConfig.create(entry)
idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/apps/config.py", line 193, in create
idpass-card-generator-django-1 | import_module(entry)
idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
idpass-card-generator-django-1 | return _bootstrap._gcd_import(name[level:], package, level)
idpass-card-generator-django-1 | File "", line 1030, in _gcd_import
idpass-card-generator-django-1 | File "", line 1007, in _find_and_load
idpass-card-generator-django-1 | File "", line 984, in _find_and_load_unlocked
idpass-card-generator-django-1 | ModuleNotFoundError: No module named 'debug_toolbar'

@renceInbox
Copy link
Collaborator

Hello @NagarjunaKuchi , please try adding DJANGO_SETTINGS_MODULE=config.settings.production to .envs/.production/.django

@renceInbox
Copy link
Collaborator

renceInbox commented Feb 6, 2023

Sample production envs

# General
# ------------------------------------------------------------------------------
USE_DOCKER=yes
IPYTHONDIR=/app/.ipython
DJANGO_SETTINGS_MODULE=config.settings.production

# Change this
DJANGO_SECRET_KEY=secret
REDIS_URL=redis://redis/0
DJANGO_ADMIN_URL=admin
SENTRY_DSN=
DJANGO_ALLOWED_HOSTS=your.host.com
```

@Nagarjunakuchi88
Copy link

Thank you @renceInbox. We are able to deploy now.

@jeremi
Copy link
Contributor

jeremi commented Mar 9, 2023

@renceInbox can you add it to the doc if it is not there and close this issue ?

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

No branches or pull requests

4 participants