2016-07-29 88 views
0

我最近部署了我的Python瓶應用的Heroku,但出現以下錯誤:Heroku的託管apython燒瓶應用程序錯誤

2016-07-29T17:32:00.145010+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-29T17:32:11.162187+00:00 heroku[web.1]: Starting process with command `gunicorn myapp:app --log-file=-` 
2016-07-29T17:32:13.548294+00:00 heroku[web.1]: Process exited with status 3 
2016-07-29T17:32:13.448537+00:00 app[web.1]: [2016-07-29 17:32:13 +0000] [3] [INFO] Starting gunicorn 19.6.0 
2016-07-29T17:32:13.449154+00:00 app[web.1]: [2016-07-29 17:32:13 +0000] [3] [INFO] Listening at: http://0.0.0.0:57535 (3) 
2016-07-29T17:32:13.456988+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 
2016-07-29T17:32:13.456990+00:00 app[web.1]:  return self.load_wsgiapp() 
2016-07-29T17:32:13.456993+00:00 app[web.1]: File "/app/myapp.py", line 71 
2016-07-29T17:32:13.456994+00:00 app[web.1]:  data[i]={**a[i],**b,**c,**d,**e} 
2016-07-29T17:32:13.563973+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-29T17:32:14.847126+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-plateau-26852.herokuapp.com request_id=820cdbd3-d478-434b-be65-06f959ca2798 fwd="79.167.50.52" dyno= connect= service= status=503 bytes= 
2016-07-29T17:32:14.370705+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=obscure-plateau-26852.herokuapp.com request_id=48a7f184-053b-4ba9-9833-a5e27df61867 fwd="79.167.50.52" dyno= connect= service= status=503 bytes= 

我試圖改變默認的端口等,但發生同樣的錯誤。

任何想法?

+0

您的項目和應用程序實際上是否稱爲「myapp」和「app」? – Withnail

+0

我運行的python腳本名爲myapp.py,因此我將其定義爲我的應用程序 – dimos

回答

1

那麼,答案是在追溯。錯誤代碼H10表示當Gunicorn嘗試將其加載到測功機時,應用程序崩潰。在您的myapp.py filedata[i]={**a[i],**b,**c,**d,**e}行71行有錯誤。您可能需要顯示文件的其餘部分才能進行調試。

+0

在本地運行此代碼時,我實際上沒有得到任何錯誤.. 因此它可能是雲上的相關問題? – dimos

+0

當然。但是,如果你不把完整的[MCVE](http://stackoverflow.com/help/mcve)問題提出來,將無法判斷。 – Withnail

+1

錯誤在於默認的python版本是2.7.12,相應的命令對這個版本無效。因此我添加了一個runtime.txt。文件的行:python-3.5.2 – dimos