我正在尝试通过heroku将项目上传到云上,但是该应用程序无法运行,并且在运行该命令时无法运行:
$ heroku logs --tail
我遇到了这个错误:
2020-08-09T07:49:54.503447+00:00 app[api]: Starting process with command `bash` by user medoabdin@gmail.com
2020-08-09T07:49:54.752948+00:00 app[web.1]: [2020-08-09 07:49:54 +0000] [9] [ERROR] Exception in worker process
2020-08-09T07:49:54.752982+00:00 app[web.1]: Traceback (most recent call last):
2020-08-09T07:49:54.752983+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-08-09T07:49:54.752984+00:00 app[web.1]: worker.init_process()
2020-08-09T07:49:54.752984+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
2020-08-09T07:49:54.752985+00:00 app[web.1]: self.load_wsgi()
2020-08-09T07:49:54.752985+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2020-08-09T07:49:54.752985+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2020-08-09T07:49:54.752986+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-08-09T07:49:54.752986+00:00 app[web.1]: self.callable = self.load()
2020-08-09T07:49:54.752987+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2020-08-09T07:49:54.752987+00:00 app[web.1]: return self.load_wsgiapp()
2020-08-09T07:49:54.752987+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2020-08-09T07:49:54.752988+00:00 app[web.1]: return util.import_app(self.app_uri)
2020-08-09T07:49:54.752988+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
2020-08-09T07:49:54.752988+00:00 app[web.1]: mod = importlib.import_module(module)
2020-08-09T07:49:54.752988+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2020-08-09T07:49:54.752989+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2020-08-09T07:49:54.752989+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2020-08-09T07:49:54.752990+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2020-08-09T07:49:54.752990+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2020-08-09T07:49:54.752991+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2020-08-09T07:49:54.752991+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 783, in exec_module
2020-08-09T07:49:54.752991+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2020-08-09T07:49:54.752992+00:00 app[web.1]: File "/app/website/wsgi.py", line 16, in <module>
2020-08-09T07:49:54.752992+00:00 app[web.1]: application = get_wsgi_application()
2020-08-09T07:49:54.752992+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2020-08-09T07:49:54.752993+00:00 app[web.1]: django.setup(set_prefix=False)
2020-08-09T07:49:54.752993+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2020-08-09T07:49:54.752993+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)
2020-08-09T07:49:54.752994+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
2020-08-09T07:49:54.752994+00:00 app[web.1]: app_config = AppConfig.create(entry)
2020-08-09T07:49:54.752994+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
2020-08-09T07:49:54.752995+00:00 app[web.1]: module = import_module(entry)
2020-08-09T07:49:54.752995+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2020-08-09T07:49:54.752995+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2020-08-09T07:49:54.752996+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2020-08-09T07:49:54.752996+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2020-08-09T07:49:54.752997+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2020-08-09T07:49:54.752997+00:00 app[web.1]: ModuleNotFoundError: No module named 'allauth'
2020-08-09T07:49:54.753518+00:00 app[web.1]: [2020-08-09 07:49:54 +0000] [9] [INFO] Worker exiting (pid: 9)
2020-08-09T07:49:54.763099+00:00 app[web.1]: [2020-08-09 07:49:54 +0000] [10] [ERROR] Exception in worker process
2020-08-09T07:49:54.763101+00:00 app[web.1]: Traceback (most recent call last):
2020-08-09T07:49:54.763102+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-08-09T07:49:54.763103+00:00 app[web.1]: worker.init_process()
2020-08-09T07:49:54.763103+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
2020-08-09T07:49:54.763103+00:00 app[web.1]: self.load_wsgi()
2020-08-09T07:49:54.763104+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2020-08-09T07:49:54.763104+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2020-08-09T07:49:54.763105+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-08-09T07:49:54.763105+00:00 app[web.1]: self.callable = self.load()
2020-08-09T07:49:54.763106+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2020-08-09T07:49:54.763106+00:00 app[web.1]: return self.load_wsgiapp()
2020-08-09T07:49:54.763107+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2020-08-09T07:49:54.763107+00:00 app[web.1]: return util.import_app(self.app_uri)
2020-08-09T07:49:54.763108+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
2020-08-09T07:49:54.763108+00:00 app[web.1]: mod = importlib.import_module(module)
2020-08-09T07:49:54.763108+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2020-08-09T07:49:54.763109+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2020-08-09T07:49:54.763109+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2020-08-09T07:49:54.763110+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2020-08-09T07:49:54.763110+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2020-08-09T07:49:54.763111+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2020-08-09T07:49:54.763111+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 783, in exec_module
2020-08-09T07:49:54.763111+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2020-08-09T07:49:54.763112+00:00 app[web.1]: File "/app/website/wsgi.py", line 16, in <module>
2020-08-09T07:49:54.763112+00:00 app[web.1]: application = get_wsgi_application()
2020-08-09T07:49:54.763113+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2020-08-09T07:49:54.763113+00:00 app[web.1]: django.setup(set_prefix=False)
2020-08-09T07:49:54.763114+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2020-08-09T07:49:54.763114+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)
2020-08-09T07:49:54.763115+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
2020-08-09T07:49:54.763115+00:00 app[web.1]: app_config = AppConfig.create(entry)
2020-08-09T07:49:54.763115+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
2020-08-09T07:49:54.763116+00:00 app[web.1]: module = import_module(entry)
2020-08-09T07:49:54.763116+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2020-08-09T07:49:54.763117+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2020-08-09T07:49:54.763117+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2020-08-09T07:49:54.763118+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2020-08-09T07:49:54.763118+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2020-08-09T07:49:54.763119+00:00 app[web.1]: ModuleNotFoundError: No module named 'allauth'
2020-08-09T07:49:54.763567+00:00 app[web.1]: [2020-08-09 07:49:54 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-08-09T07:49:54.818652+00:00 heroku[web.1]: State changed from starting to up
2020-08-09T07:49:54.964315+00:00 app[web.1]: [2020-08-09 07:49:54 +0000] [4] [INFO] Shutting down: Master
2020-08-09T07:49:54.964350+00:00 app[web.1]: [2020-08-09 07:49:54 +0000] [4] [INFO] Reason: Worker failed to boot.
2020-08-09T07:49:55.073220+00:00 heroku[web.1]: Process exited with status 3
2020-08-09T07:49:55.106989+00:00 heroku[web.1]: State changed from up to crashed
2020-08-09T07:50:02.149154+00:00 heroku[run.9607]: State changed from starting to up
2020-08-09T07:50:02.224085+00:00 heroku[run.9607]: Awaiting client
2020-08-09T07:50:02.260835+00:00 heroku[run.9607]: Starting process with command `bash`
2020-08-09T07:50:05.593644+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=esaal.herokuapp.com request_id=e2c21698-c736-4388-8acc-8c2acf5c4a1a fwd="197.52.151.176" dyno= connect= service= status=503 bytes= protocol=http
2020-08-09T07:50:06.692699+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=esaal.herokuapp.com request_id=57de2f76-e175-4d12-b692-b3ab3eda5ae9 fwd="197.52.151.176" dyno= connect= service= status=503 bytes= protocol=http
2020-08-09T07:51:23.582160+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=esaal.herokuapp.com request_id=f21a4d13-c9c5-45df-a1ab-dde01663f00c fwd="197.52.151.176" dyno= connect= service= status=503 bytes= protocol=http
2020-08-09T07:51:24.163714+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=esaal.herokuapp.com request_id=f3033e9c-627d-42e6-a517-08671e955ae1 fwd="197.52.151.176" dyno= connect= service= status=503 bytes= protocol=http
2020-08-09T07:53:23.446182+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=esaal.herokuapp.com request_id=4828e7fe-eefa-4471-9809-f1f8e75541dd fwd="197.52.151.176" dyno= connect= service= status=503 bytes= protocol=http
2020-08-09T07:53:24.480361+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=esaal.herokuapp.com request_id=0d3d0677-35ea-4798-b688-6feb5a7537c2 fwd="197.52.151.176" dyno= connect= service= status=503 bytes= protocol=http
2020-08-09T07:55:09.073978+00:00 heroku[run.9607]: Client connection closed. Sending SIGHUP to all processes
2020-08-09T07:55:09.601190+00:00 heroku[run.9607]: Process exited with status 129
2020-08-09T07:55:09.637974+00:00 heroku[run.9607]: State changed from up to complete
知道我安装了django-allauth,但是我得到消息:在这些错误中也没有名为allauth的模块,我进行了迁移,并得到了消息:没有要应用的迁移,这意味着迁移确实可以正常工作,但是我没有想出如何忽略这些错误并成功运行网站的方法