· 4 years ago · Jun 21, 2021, 06:26 AM
1-----> Building on the Heroku-20 stack
2-----> Using buildpack: heroku/python
3-----> Python app detected
4-----> No Python version was specified. Using the same version as the last build: python-3.9.5
5 To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
6-----> No change in requirements detected, installing from cache
7-----> Using cached install of python-3.9.5
8-----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
9-----> Installing SQLite3
10-----> Installing requirements with pip
11-----> $ python manage.py collectstatic --noinput
12 Traceback (most recent call last):
13 File "/tmp/build_f2b80a31/manage.py", line 22, in <module>
14 main()
15 File "/tmp/build_f2b80a31/manage.py", line 18, in main
16 execute_from_command_line(sys.argv)
17 File "/app/.heroku/python/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
18 utility.execute()
19 File "/app/.heroku/python/lib/python3.9/site-packages/django/core/management/__init__.py", line 363, in execute
20 settings.INSTALLED_APPS
21 File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__
22 self._setup(name)
23 File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup
24 self._wrapped = Settings(settings_module)
25 File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 170, in __init__
26 mod = importlib.import_module(self.SETTINGS_MODULE)
27 File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
28 return _bootstrap._gcd_import(name[level:], package, level)
29 File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
30 File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
31 File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
32 File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
33 File "<frozen importlib._bootstrap_external>", line 855, in exec_module
34 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
35 File "/tmp/build_f2b80a31/mysite/settings.py", line 9, in <module>
36 SECRET_KEY =config('SECRET_KEY')
37 File "/app/.heroku/python/lib/python3.9/site-packages/decouple.py", line 199, in __call__
38 return self.config(*args, **kwargs)
39 File "/app/.heroku/python/lib/python3.9/site-packages/decouple.py", line 83, in __call__
40 return self.get(*args, **kwargs)
41 File "/app/.heroku/python/lib/python3.9/site-packages/decouple.py", line 68, in get
42 raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
43 decouple.UndefinedValueError: SECRET_KEY not found. Declare it as envvar or define a default value.
44 ! Error while running '$ python manage.py collectstatic --noinput'.
45 See traceback above for details.
46 You may need to update application code to resolve this error.
47 Or, you can disable collectstatic for this application:
48 $ heroku config:set DISABLE_COLLECTSTATIC=1
49 https://devcenter.heroku.com/articles/django-assets
50 ! Push rejected, failed to compile Python app.
51 ! Push failed