我绝对是 Django 和 Python 的初学者,并从 Django 创建了一个网站。我正在尝试在 Heroku 上托管我的网站并使用 GitHub 进行部署,但显示应用程序错误。我正在寻找解决此问题的方法。请帮帮我。
我的 github 项目:- Pyshop 和 heroku 项目:pysho。它显示一个 application error。
当我运行命令时:Heroku logs --tail --app pysho 它显示:
» Warning: Heroku update available from 7.53.0 to 7.54.1.
2021-07-03T05:04:53.682795+00:00 app[web.1]: self._wrapped = Settings(settings_module)
2021-07-03T05:04:53.682796+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 170, in __init__
2021-07-03T05:04:53.682796+00:00 app[web.1]: mod = importlib.import_module(self.SETTINGS_MODULE)
2021-07-03T05:04:53.682796+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-07-03T05:04:53.682797+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-07-03T05:04:53.682797+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-07-03T05:04:53.682797+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-07-03T05:04:53.682798+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
2021-07-03T05:04:53.682798+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2021-07-03T05:04:53.682798+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-07-03T05:04:53.682799+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-07-03T05:04:53.682799+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-07-03T05:04:53.682799+00:00 app[web.1]: ModuleNotFoundError: No module named 'ebgymmie'
2021-07-03T05:04:53.683086+00:00 app[web.1]: [2021-07-03 05:04:53 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-07-03T05:04:53.777109+00:00 app[web.1]: [2021-07-03 05:04:53 +0000] [8] [ERROR] Exception in worker process
2021-07-03T05:04:53.777111+00:00 app[web.1]: Traceback (most recent call last):
2021-07-03T05:04:53.777112+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-07-03T05:04:53.777112+00:00 app[web.1]: worker.init_process()
2021-07-03T05:04:53.777113+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-07-03T05:04:53.777113+00:00 app[web.1]: self.load_wsgi()
2021-07-03T05:04:53.777114+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-07-03T05:04:53.777114+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-07-03T05:04:53.777115+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-07-03T05:04:53.777115+00:00 app[web.1]: self.callable = self.load()
2021-07-03T05:04:53.777116+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-07-03T05:04:53.777116+00:00 app[web.1]: return self.load_wsgiapp()
2021-07-03T05:04:53.777116+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-07-03T05:04:53.777117+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-07-03T05:04:53.777117+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-07-03T05:04:53.777118+00:00 app[web.1]: mod = importlib.import_module(module)
2021-07-03T05:04:53.777118+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-07-03T05:04:53.777119+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-07-03T05:04:53.777119+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-07-03T05:04:53.777120+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-07-03T05:04:53.777120+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2021-07-03T05:04:53.777120+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2021-07-03T05:04:53.777121+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 790, in exec_module
2021-07-03T05:04:53.777121+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2021-07-03T05:04:53.777121+00:00 app[web.1]: File "/app/pyshop/wsgi.py", line 17, in <module>
2021-07-03T05:04:53.777122+00:00 app[web.1]: application = get_wsgi_application()
2021-07-03T05:04:53.777122+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2021-07-03T05:04:53.777122+00:00 app[web.1]: django.setup(set_prefix=False)
2021-07-03T05:04:53.777123+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/__init__.py", line 19, in setup
2021-07-03T05:04:53.777123+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2021-07-03T05:04:53.777123+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__
2021-07-03T05:04:53.777124+00:00 app[web.1]: self._setup(name)
2021-07-03T05:04:53.777124+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup
2021-07-03T05:04:53.777124+00:00 app[web.1]: self._wrapped = Settings(settings_module)
2021-07-03T05:04:53.777124+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/__init__.py", line 170, in __init__
2021-07-03T05:04:53.777125+00:00 app[web.1]: mod = importlib.import_module(self.SETTINGS_MODULE)
2021-07-03T05:04:53.777125+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-07-03T05:04:53.777125+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-07-03T05:04:53.777126+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-07-03T05:04:53.777152+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-07-03T05:04:53.777152+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
2021-07-03T05:04:53.777152+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2021-07-03T05:04:53.777153+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-07-03T05:04:53.777153+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-07-03T05:04:53.777153+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-07-03T05:04:53.777154+00:00 app[web.1]: ModuleNotFoundError: No module named 'ebgymmie'
2021-07-03T05:04:53.777380+00:00 app[web.1]: [2021-07-03 05:04:53 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-07-03T05:04:53.841119+00:00 app[web.1]: Traceback (most recent call last):
2021-07-03T05:04:53.841128+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 209, in run
2021-07-03T05:04:53.841441+00:00 app[web.1]: self.sleep()
2021-07-03T05:04:53.841446+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 357, in sleep
2021-07-03T05:04:53.841780+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2021-07-03T05:04:53.841781+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-07-03T05:04:53.842010+00:00 app[web.1]: self.reap_workers()
2021-07-03T05:04:53.842021+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-07-03T05:04:53.842252+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-07-03T05:04:53.842321+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-07-03T05:04:53.842324+00:00 app[web.1]:
2021-07-03T05:04:53.842324+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2021-07-03T05:04:53.842325+00:00 app[web.1]:
2021-07-03T05:04:53.842328+00:00 app[web.1]: Traceback (most recent call last):
2021-07-03T05:04:53.842348+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
2021-07-03T05:04:53.842483+00:00 app[web.1]: sys.exit(run())
2021-07-03T05:04:53.842488+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
2021-07-03T05:04:53.842637+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2021-07-03T05:04:53.842638+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 231, in run
2021-07-03T05:04:53.842824+00:00 app[web.1]: super().run()
2021-07-03T05:04:53.842830+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run
2021-07-03T05:04:53.842984+00:00 app[web.1]: Arbiter(self).run()
2021-07-03T05:04:53.842993+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 229, in run
2021-07-03T05:04:53.843268+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2021-07-03T05:04:53.843270+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 342, in halt
2021-07-03T05:04:53.843557+00:00 app[web.1]: self.stop()
2021-07-03T05:04:53.843562+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 393, in stop
2021-07-03T05:04:53.843858+00:00 app[web.1]: time.sleep(0.1)
2021-07-03T05:04:53.843861+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-07-03T05:04:53.844105+00:00 app[web.1]: self.reap_workers()
2021-07-03T05:04:53.844108+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-07-03T05:04:53.844432+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-07-03T05:04:53.844501+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-07-03T05:04:53.921300+00:00 heroku[web.1]: Process exited with status 1
2021-07-03T05:04:53.981911+00:00 heroku[web.1]: State changed from starting to crashed
2021-07-03T05:16:38.565986+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pysho.herokuapp.com request_id=849145de-86af-44d5-a50a-553931c29cb6 fwd="117.215.2.74" dyno= connect= service= status=503 bytes= protocol=https
2021-07-03T05:16:39.460687+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pysho.herokuapp.com request_id=dc03e5cd-feee-49a4-bc51-ce0e76b1f398 fwd="117.215.2.74" dyno= connect= service= status=503 bytes= protocol=https
2021-07-03T05:17:29.828504+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pysho.herokuapp.com request_id=fbff5f86-27ab-4d54-b093-64142743d3a8 fwd="117.215.2.74" dyno= connect= service= status=503 bytes= protocol=https
2021-07-03T05:17:30.705911+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pysho.herokuapp.com request_id=4c6da865-53d4-4fe0-9aa3-2431f6e947ae fwd="117.215.2.74" dyno= connect= service= status=503 bytes= protocol=https