这是我第一次在heroku中进行部署,请帮忙。
我的代码在本地运行,在我按下heroku之后,它给出了应用程序错误。我检查
((.))
((*))
\(.*)\
\(.*\)
但是我真的不知道该如何解决。下面是日志结果。
> heroku logs --tail
仅供参考:这是使用python破折号的简单应用。我已经在虚拟环境中安装了gunicorn。此应用在本地计算机上运行良好。
更新:这是代码。
> • 2018-08-18T05:38:05.501931+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
• 2018-08-18T05:38:05.505510+00:00 app[web.1]: [2018-08-18 05:38:05 +0000] [9] [INFO] Worker exiting (pid: 9)
• 2018-08-18T05:38:05.658199+00:00 app[web.1]: Traceback (most recent call last):
• 2018-08-18T05:38:05.658260+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 210, in run
• 2018-08-18T05:38:05.658711+00:00 app[web.1]: self.sleep()
• 2018-08-18T05:38:05.658752+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 360, in sleep
• 2018-08-18T05:38:05.659114+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
• 2018-08-18T05:38:05.659153+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
• 2018-08-18T05:38:05.659419+00:00 app[web.1]: self.reap_workers()
• 2018-08-18T05:38:05.659459+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
• 2018-08-18T05:38:05.659873+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
• 2018-08-18T05:38:05.659946+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
• 2018-08-18T05:38:05.659977+00:00 app[web.1]:
• 2018-08-18T05:38:05.659980+00:00 app[web.1]: During handling of the above exception, another exception occurred:
• 2018-08-18T05:38:05.659981+00:00 app[web.1]:
• 2018-08-18T05:38:05.660044+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
• 2018-08-18T05:38:05.660011+00:00 app[web.1]: Traceback (most recent call last):
• 2018-08-18T05:38:05.660230+00:00 app[web.1]: sys.exit(run())
• 2018-08-18T05:38:05.660268+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
• 2018-08-18T05:38:05.660472+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
• 2018-08-18T05:38:05.660501+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
• 2018-08-18T05:38:05.660759+00:00 app[web.1]: super(Application, self).run()
• 2018-08-18T05:38:05.660796+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
• 2018-08-18T05:38:05.660990+00:00 app[web.1]: Arbiter(self).run()
• 2018-08-18T05:38:05.661028+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 232, in run
• 2018-08-18T05:38:05.661287+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
• 2018-08-18T05:38:05.661323+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 345, in halt
• 2018-08-18T05:38:05.661673+00:00 app[web.1]: self.stop()
• 2018-08-18T05:38:05.661710+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
• 2018-08-18T05:38:05.662057+00:00 app[web.1]: time.sleep(0.1)
• 2018-08-18T05:38:05.662092+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
• 2018-08-18T05:38:05.662352+00:00 app[web.1]: self.reap_workers()
• 2018-08-18T05:38:05.662390+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
• 2018-08-18T05:38:05.662785+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
• 2018-08-18T05:38:05.662834+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
• 2018-08-18T05:38:05.784984+00:00 heroku[web.1]: Process exited with status 1
• 2018-08-18T05:38:05.807101+00:00 heroku[web.1]: State changed from up to crashed
• 2018-08-18T05:38:26.678633+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mydashami93.herokuapp.com request_id=4bdfe1c6-a763-4d92-af38-b886239125a2 fwd="60.48.172.15" dyno= connect= service= status=503 bytes= protocol=https
• 2018-08-18T05:38:27.065103+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mydashami93.herokuapp.com request_id=5e82f521-bf73-42fe-8f29-91d5cb3ac88d fwd="60.48.172.15" dyno= connect= service= status=503 bytes= protocol=https
• 2018-08-18T05:45:07.703737+00:00 heroku[web.1]: State changed from crashed to starting
• 2018-08-18T05:45:16.311342+00:00 heroku[web.1]: Starting process with command `gunicorn app1: server`
• 2018-08-18T05:45:18.851972+00:00 app[web.1]: [2018-08-18 05:45:18 +0000] [4] [INFO] Starting gunicorn 19.9.0
• 2018-08-18T05:45:18.852920+00:00 app[web.1]: [2018-08-18 05:45:18 +0000] [4] [INFO] Listening at: http://0.0.0.0:54457 (4)
• 2018-08-18T05:45:18.853109+00:00 app[web.1]: [2018-08-18 05:45:18 +0000] [4] [INFO] Using worker: sync
• 2018-08-18T05:45:18.865386+00:00 app[web.1]: [2018-08-18 05:45:18 +0000] [8] [INFO] Booting worker with pid: 8
• 2018-08-18T05:45:18.895411+00:00 app[web.1]: [2018-08-18 05:45:18 +0000] [9] [INFO] Booting worker with pid: 9
• 2018-08-18T05:45:20.041686+00:00 heroku[web.1]: State changed from starting to up
• 2018-08-18T05:45:21.348343+00:00 app[web.1]: /app/.heroku/python/lib/python3.6/site-packages/plotly/tools.py:102: UserWarning:
• 2018-08-18T05:45:21.348367+00:00 app[web.1]:
• 2018-08-18T05:45:21.348370+00:00 app[web.1]: Looks like you don't have 'read-write' permission to your 'home' ('~') directory or to our '~/.plotly' directory. That means plotly's python api can't setup local configuration files. No problem though! You'll just have to sign-in using 'plotly.plotly.sign_in()'. For help with that: 'help(plotly.plotly.sign_in)'.
• 2018-08-18T05:45:21.348372+00:00 app[web.1]: Questions? Visit https://support.plot.ly
• 2018-08-18T05:45:21.348374+00:00 app[web.1]:
• 2018-08-18T05:45:22.939982+00:00 app[web.1]: [2018-08-18 05:45:22 +0000] [8] [ERROR] Exception in worker process
• 2018-08-18T05:45:22.939995+00:00 app[web.1]: Traceback (most recent call last):
• 2018-08-18T05:45:22.939997+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
• 2018-08-18T05:45:22.940001+00:00 app[web.1]: worker.init_process()
• 2018-08-18T05:45:22.940003+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
• 2018-08-18T05:45:22.940005+00:00 app[web.1]: self.load_wsgi()
• 2018-08-18T05:45:22.940006+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
• 2018-08-18T05:45:22.940008+00:00 app[web.1]: self.wsgi = self.app.wsgi()
• 2018-08-18T05:45:22.940010+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
• 2018-08-18T05:45:22.940013+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
• 2018-08-18T05:45:22.940012+00:00 app[web.1]: self.callable = self.load()
• 2018-08-18T05:45:22.940016+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
• 2018-08-18T05:45:22.940015+00:00 app[web.1]: return self.load_wsgiapp()
• 2018-08-18T05:45:22.940018+00:00 app[web.1]: return util.import_app(self.app_uri)
• 2018-08-18T05:45:22.940020+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 362, in import_app
• 2018-08-18T05:45:22.940021+00:00 app[web.1]: app = eval(obj, vars(mod))
• 2018-08-18T05:45:22.940023+00:00 app[web.1]: File "<string>", line 0
• 2018-08-18T05:45:22.940024+00:00 app[web.1]:
• 2018-08-18T05:45:22.940026+00:00 app[web.1]: ^
• 2018-08-18T05:45:22.940197+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
• 2018-08-18T05:45:22.945390+00:00 app[web.1]: [2018-08-18 05:45:22 +0000] [8] [INFO] Worker exiting (pid: 8)
• 2018-08-18T05:45:23.003612+00:00 app[web.1]: [2018-08-18 05:45:23 +0000] [9] [ERROR] Exception in worker process
• 2018-08-18T05:45:23.003616+00:00 app[web.1]: Traceback (most recent call last):
• 2018-08-18T05:45:23.003619+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
• 2018-08-18T05:45:23.003620+00:00 app[web.1]: worker.init_process()
• 2018-08-18T05:45:23.003622+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
• 2018-08-18T05:45:23.003623+00:00 app[web.1]: self.load_wsgi()
• 2018-08-18T05:45:23.003626+00:00 app[web.1]: self.wsgi = self.app.wsgi()
• 2018-08-18T05:45:23.003625+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
• 2018-08-18T05:45:23.003628+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
• 2018-08-18T05:45:23.003630+00:00 app[web.1]: self.callable = self.load()
• 2018-08-18T05:45:23.003632+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
• 2018-08-18T05:45:23.003633+00:00 app[web.1]: return self.load_wsgiapp()
• 2018-08-18T05:45:23.003635+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
• 2018-08-18T05:45:23.003636+00:00 app[web.1]: return util.import_app(self.app_uri)
• 2018-08-18T05:45:23.003638+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 362, in import_app
• 2018-08-18T05:45:23.003641+00:00 app[web.1]: File "<string>", line 0
• 2018-08-18T05:45:23.003639+00:00 app[web.1]: app = eval(obj, vars(mod))
• 2018-08-18T05:45:23.003643+00:00 app[web.1]:
• 2018-08-18T05:45:23.003645+00:00 app[web.1]: ^
• 2018-08-18T05:45:23.003654+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
• 2018-08-18T05:45:23.014489+00:00 app[web.1]: [2018-08-18 05:45:23 +0000] [9] [INFO] Worker exiting (pid: 9)
• 2018-08-18T05:45:23.309221+00:00 app[web.1]: [2018-08-18 05:45:23 +0000] [4] [INFO] Shutting down: Master
• 2018-08-18T05:45:23.309513+00:00 app[web.1]: [2018-08-18 05:45:23 +0000] [4] [INFO] Reason: Worker failed to boot.
• 2018-08-18T05:45:23.452269+00:00 heroku[web.1]: Process exited with status 3
• 2018-08-18T05:45:23.473060+00:00 heroku[web.1]: State changed from up to crashed
• 2018-08-18T05:45:26.925351+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mydashami93.herokuapp.com request_id=85149785-05c9-4612-932a-491621a81817 fwd="60.48.172.15" dyno= connect= service= status=503 bytes= protocol=https
• 2018-08-18T05:45:27.282974+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mydashami93.herokuapp.com request_id=6c3e8b27-b762-4c26-a3f4-9b4ac8b9ca77 fwd="60.48.172.15" dyno= connect= service= status=503 bytes= protocol=https
• 2018-08-18T05:53:48.404963+00:00 heroku[web.1]: State changed from crashed to starting
• 2018-08-18T05:53:56.546410+00:00 heroku[web.1]: Starting process with command `gunicorn app1: server`
• 2018-08-18T05:53:58.912978+00:00 app[web.1]: [2018-08-18 05:53:58 +0000] [4] [INFO] Starting gunicorn 19.9.0
• 2018-08-18T05:53:58.914454+00:00 app[web.1]: [2018-08-18 05:53:58 +0000] [4] [INFO] Listening at: http://0.0.0.0:28231 (4)
• 2018-08-18T05:53:58.914609+00:00 app[web.1]: [2018-08-18 05:53:58 +0000] [4] [INFO] Using worker: sync
• 2018-08-18T05:53:58.919828+00:00 app[web.1]: [2018-08-18 05:53:58 +0000] [8] [INFO] Booting worker with pid: 8
• 2018-08-18T05:53:58.932511+00:00 app[web.1]: [2018-08-18 05:53:58 +0000] [9] [INFO] Booting worker with pid: 9
• 2018-08-18T05:53:59.260794+00:00 heroku[web.1]: State changed from starting to up
• 2018-08-18T05:54:03.048114+00:00 app[web.1]: [2018-08-18 05:54:03 +0000] [8] [ERROR] Exception in worker process
• 2018-08-18T05:54:03.048149+00:00 app[web.1]: Traceback (most recent call last):
• 2018-08-18T05:54:03.048159+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
• 2018-08-18T05:54:03.048162+00:00 app[web.1]: worker.init_process()
• 2018-08-18T05:54:03.048163+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
• 2018-08-18T05:54:03.048165+00:00 app[web.1]: self.load_wsgi()
• 2018-08-18T05:54:03.048166+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
• 2018-08-18T05:54:03.048168+00:00 app[web.1]: self.wsgi = self.app.wsgi()
• 2018-08-18T05:54:03.048171+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
• 2018-08-18T05:54:03.048172+00:00 app[web.1]: self.callable = self.load()
• 2018-08-18T05:54:03.048174+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
• 2018-08-18T05:54:03.048175+00:00 app[web.1]: return self.load_wsgiapp()
• 2018-08-18T05:54:03.048177+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
• 2018-08-18T05:54:03.048179+00:00 app[web.1]: return util.import_app(self.app_uri)
• 2018-08-18T05:54:03.048180+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 362, in import_app
• 2018-08-18T05:54:03.048182+00:00 app[web.1]: app = eval(obj, vars(mod))
• 2018-08-18T05:54:03.048183+00:00 app[web.1]: File "<string>", line 0
• 2018-08-18T05:54:03.048185+00:00 app[web.1]:
• 2018-08-18T05:54:03.048187+00:00 app[web.1]: ^
• 2018-08-18T05:54:03.048195+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
• 2018-08-18T05:54:03.050837+00:00 app[web.1]: [2018-08-18 05:54:03 +0000] [8] [INFO] Worker exiting (pid: 8)
• 2018-08-18T05:54:03.091094+00:00 app[web.1]: [2018-08-18 05:54:03 +0000] [9] [ERROR] Exception in worker process
• 2018-08-18T05:54:03.091099+00:00 app[web.1]: Traceback (most recent call last):
• 2018-08-18T05:54:03.091102+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
• 2018-08-18T05:54:03.091104+00:00 app[web.1]: worker.init_process()
• 2018-08-18T05:54:03.091106+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
• 2018-08-18T05:54:03.091108+00:00 app[web.1]: self.load_wsgi()
• 2018-08-18T05:54:03.091110+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
• 2018-08-18T05:54:03.091111+00:00 app[web.1]: self.wsgi = self.app.wsgi()
• 2018-08-18T05:54:03.091113+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
• 2018-08-18T05:54:03.091115+00:00 app[web.1]: self.callable = self.load()
• 2018-08-18T05:54:03.091117+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
• 2018-08-18T05:54:03.091118+00:00 app[web.1]: return self.load_wsgiapp()
• 2018-08-18T05:54:03.091121+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
• 2018-08-18T05:54:03.091122+00:00 app[web.1]: return util.import_app(self.app_uri)
• 2018-08-18T05:54:03.091124+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 362, in import_app
• 2018-08-18T05:54:03.091126+00:00 app[web.1]: app = eval(obj, vars(mod))
• 2018-08-18T05:54:03.091128+00:00 app[web.1]: File "<string>", line 0
• 2018-08-18T05:54:03.091152+00:00 app[web.1]:
• 2018-08-18T05:54:03.091155+00:00 app[web.1]: ^
• 2018-08-18T05:54:03.091164+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
• 2018-08-18T05:54:03.093862+00:00 app[web.1]: [2018-08-18 05:54:03 +0000] [9] [INFO] Worker exiting (pid: 9)
• 2018-08-18T05:54:03.331532+00:00 app[web.1]: [2018-08-18 05:54:03 +0000] [4] [INFO] Shutting down: Master
• 2018-08-18T05:54:03.331708+00:00 app[web.1]: [2018-08-18 05:54:03 +0000] [4] [INFO] Reason: Worker failed to boot.
• 2018-08-18T05:54:03.469989+00:00 heroku[web.1]: Process exited with status 3
• 2018-08-18T05:54:03.486222+00:00 heroku[web.1]: State changed from up to crashed
•