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

KeyError: 'DJANGO_SECRET_KEY' #2

Open
smobbl-bobbl opened this issue Jun 12, 2018 · 1 comment
Open

KeyError: 'DJANGO_SECRET_KEY' #2

smobbl-bobbl opened this issue Jun 12, 2018 · 1 comment

Comments

@smobbl-bobbl
Copy link

When I add this buildpack to heroku, I receive following error when pushing the git to heroku:

[root@zubserv utiluruServer]# git push heroku master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 385 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.5 (you are using python-3.6.3, which is unsupported).
remote: ! We recommend upgrading by specifying the latest version (python-3.6.5).
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote:
remote: -----> $ python manage.py collectstatic --noinput
remote: /app/.heroku/python/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
remote: """)
remote: 187 static files copied to '/tmp/build_918c6de6c7aaae1c4390cf0a65ae5b06/staticfiles'.
remote:
remote: -----> django-compressor app detected
remote: -----> Running django-compressor
remote: Traceback (most recent call last):
remote: File "manage.py", line 15, in <module>
remote: execute_from_command_line(sys.argv)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
remote: utility.execute()
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 317, in execute
remote: settings.INSTALLED_APPS
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
remote: self._setup(name)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/conf/__init__.py", line 43, in _setup
remote: self._wrapped = Settings(settings_module)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/conf/__init__.py", line 106, in __init__
remote: mod = importlib.import_module(self.SETTINGS_MODULE)
remote: File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
remote: return _bootstrap._gcd_import(name[level:], package, level)
remote: File "<frozen importlib._bootstrap>", line 994, in _gcd_import
remote: File "<frozen importlib._bootstrap>", line 971, in _find_and_load
remote: File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
remote: File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
remote: File "<frozen importlib._bootstrap_external>", line 678, in exec_module
remote: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
remote: File "/tmp/build_918c6de6c7aaae1c4390cf0a65ae5b06/utiluruServer/settings.py", line 34, in <module>
remote: SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
remote: File "/app/.heroku/python/lib/python3.6/os.py", line 669, in __getitem__
remote: raise KeyError(key) from None
remote: KeyError: 'DJANGO_SECRET_KEY'
remote: ! Push rejected, failed to compile django-compressor app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to utiluru.

@EO2875
Copy link

EO2875 commented Jul 29, 2020

Yeah, I get the same error.

It's not just the secret key, but all environmental variables.

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

2 participants