0
votes

I was trying to create an app with the learned model with flask through Heroku env 2019-11-17T01:24:29.506868+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2019-11-17T01:24:29.506869+00:00 app[web.1]: worker.init_process() 2019-11-17T01:24:29.506871+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 133, in init_process 2019-11-17T01:24:29.506872+00:00 app[web.1]: self.load_wsgi() 2019-11-17T01:24:29.506874+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 142, in load_wsgi 2019-11-17T01:24:29.506875+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2019-11-17T01:24:29.506877+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi 2019-11-17T01:24:29.506878+00:00 app[web.1]: self.callable = self.load() 2019-11-17T01:24:29.506880+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load 2019-11-17T01:24:29.506881+00:00 app[web.1]: return self.load_wsgiapp() 2019-11-17T01:24:29.506883+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp 2019-11-17T01:24:29.506884+00:00 app[web.1]: return util.import_app(self.app_uri) 2019-11-17T01:24:29.506885+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 331, in import_app 2019-11-17T01:24:29.506887+00:00 app[web.1]: mod = importlib.import_module(module) 2019-11-17T01:24:29.506889+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module 2019-11-17T01:24:29.506890+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level) 2019-11-17T01:24:29.506892+00:00 app[web.1]: File "", line 994, in _gcd_import 2019-11-17T01:24:29.506893+00:00 app[web.1]: File "", line 971, in _find_and_load 2019-11-17T01:24:29.506894+00:00 app[web.1]: File "", line 953, in _find_and_load_unlocked 2019-11-17T01:24:29.506896+00:00 app[web.1]: ModuleNotFoundError: No module named 'application' 2019-11-17T01:24:29.506986+00:00 app[web.1]: [2019-11-17 01:24:29 +0000] [11] [INFO] Worker exiting (pid: 11) 2019-11-17T01:24:29.533341+00:00 app[web.1]: [2019-11-17 01:24:29 +0000] [4] [INFO] Shutting down: Master 2019-11-17T01:24:29.533421+00:00 app[web.1]: [2019-11-17 01:24:29 +0000] [4] [INFO] Reason: Worker failed to boot. 2019-11-17T01:24:29.601346+00:00 heroku[web.1]: Process exited with status 3 2019-11-17T04:07:39.025573+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ny-cab-fare-prediction-api.herokuapp.com request_id=c63bd1ad-8314-452b-b9ea-5f72a0c524cf fwd="103.5.134.31" dyno= connect= service= status=503 bytes= protocol=https 2019-11-17T04:07:39.936881+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ny-cab-fare-prediction-api.herokuapp.com request_id=4dd5e588-dd2c-486e-a998-6bd6cbf5298d fwd="103.5.134.31" dyno= connect= service= status=503 bytes= protocol=https 2019-11-17T05:18:07.225765+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ny-cab-fare-prediction-api.herokuapp.com request_id=fc42949c-9825-4ecb-877e-b13983bbb948 fwd="103.5.134.31" dyno= connect= service= status=503 bytes= protocol=https 2019-11-17T05:18:07.906552+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ny-cab-fare-prediction-api.herokuapp.com request_id=3e214acf-6344-418e-ac4f-9fc064471329 fwd="103.5.134.31" dyno= connect= service= status=503 bytes= protocol=https 2019-11-17T05:18:33.000000+00:00 app[api]: Build started by user [email protected] 2019-11-17T05:19:07.395350+00:00 heroku[web.1]: State changed from crashed to starting 2019-11-17T05:19:07.061059+00:00 app[api]: Deploy 1345edea by user [email protected] 2019-11-17T05:19:07.061059+00:00 app[api]: Release v7 created by user [email protected] 2019-11-17T05:19:14.659794+00:00 heroku[web.1]: Starting process with command gunicorn application:app 2019-11-17T05:19:17.128085+00:00 heroku[web.1]: State changed from starting to crashed 2019-11-17T05:19:17.132088+00:00 heroku[web.1]: State changed from crashed to starting 2019-11-17T05:19:16.965846+00:00 app[web.1]: [2019-11-17 05:19:16 +0000] [4] [INFO] Starting gunicorn 20.0.0 2019-11-17T05:19:16.966852+00:00 app[web.1]: [2019-11-17 05:19:16 +0000] [4] [INFO] Listening at: http://0.0.0.0:32063 (4) 2019-11-17T05:19:16.967039+00:00 app[web.1]: [2019-11-17 05:19:16 +0000] [4] [INFO] Using worker: sync 2019-11-17T05:19:16.971935+00:00 app[web.1]: [2019-11-17 05:19:16 +0000] [11] [INFO] Booting worker with pid: 11 2019-11-17T05:19:16.977535+00:00 app[web.1]: [2019-11-17 05:19:16 +0000] [11] [ERROR] Exception in worker process 2019-11-17T05:19:16.977539+00:00 app[web.1]: Traceback (most recent call last): 2019-11-17T05:19:16.977542+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2019-11-17T05:19:16.977544+00:00 app[web.1]: worker.init_process() 2019-11-17T05:19:16.977546+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 133, in init_process 2019-11-17T05:19:16.977548+00:00 app[web.1]: self.load_wsgi() 2019-11-17T05:19:16.977550+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 142, in load_wsgi 2019-11-17T05:19:16.977552+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2019-11-17T05:19:16.977554+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi 2019-11-17T05:19:16.977556+00:00 app[web.1]: self.callable = self.load() 2019-11-17T05:19:16.977558+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load 2019-11-17T05:19:16.977560+00:00 app[web.1]: return self.load_wsgiapp() 2019-11-17T05:19:16.977562+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp 2019-11-17T05:19:16.977564+00:00 app[web.1]: return util.import_app(self.app_uri) 2019-11-17T05:19:16.977566+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 331, in import_app 2019-11-17T05:19:16.977568+00:00 app[web.1]: mod = importlib.import_module(module) 2019-11-17T05:19:16.977570+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module 2019-11-17T05:19:16.977573+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level) 2019-11-17T05:19:16.977575+00:00 app[web.1]: File "", line 994, in _gcd_import 2019-11-17T05:19:16.977577+00:00 app[web.1]: File "", line 971, in _find_and_load 2019-11-17T05:19:16.977579+00:00 app[web.1]: File "", line 953, in _find_and_load_unlocked 2019-11-17T05:19:16.977587+00:00 app[web.1]: ModuleNotFoundError: No module named 'application' 2019-11-17T05:19:16.977747+00:00 app[web.1]: [2019-11-17 05:19:16 +0000] [11] [INFO] Worker exiting (pid: 11) 2019-11-17T05:19:17.019314+00:00 app[web.1]: [2019-11-17 05:19:17 +0000] [4] [INFO] Shutting down: Master 2019-11-17T05:19:17.019530+00:00 app[web.1]: [2019-11-17 05:19:17 +0000] [4] [INFO] Reason: Worker failed to boot. 2019-11-17T05:19:17.104870+00:00 heroku[web.1]: Process exited with status 3 2019-11-17T05:19:25.549819+00:00 heroku[web.1]: Starting process with command gunicorn application:app 2019-11-17T05:19:27.758021+00:00 heroku[web.1]: State changed from starting to crashed 2019-11-17T05:19:27.630416+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [4] [INFO] Starting gunicorn 20.0.0 2019-11-17T05:19:27.630968+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [4] [INFO] Listening at: http://0.0.0.0:30205 (4) 2019-11-17T05:19:27.631086+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [4] [INFO] Using worker: sync 2019-11-17T05:19:27.636390+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [11] [INFO] Booting worker with pid: 11 2019-11-17T05:19:27.642955+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [11] [ERROR] Exception in worker process 2019-11-17T05:19:27.642958+00:00 app[web.1]: Traceback (most recent call last): 2019-11-17T05:19:27.642959+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2019-11-17T05:19:27.642964+00:00 app[web.1]: worker.init_process() 2019-11-17T05:19:27.642965+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 133, in init_process 2019-11-17T05:19:27.642967+00:00 app[web.1]: self.load_wsgi() 2019-11-17T05:19:27.642968+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 142, in load_wsgi 2019-11-17T05:19:27.642970+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2019-11-17T05:19:27.642972+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi 2019-11-17T05:19:27.642973+00:00 app[web.1]: self.callable = self.load() 2019-11-17T05:19:27.642975+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load 2019-11-17T05:19:27.642976+00:00 app[web.1]: return self.load_wsgiapp() 2019-11-17T05:19:27.642978+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp 2019-11-17T05:19:27.642979+00:00 app[web.1]: return util.import_app(self.app_uri) 2019-11-17T05:19:27.642980+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 331, in import_app 2019-11-17T05:19:27.642982+00:00 app[web.1]: mod = importlib.import_module(module) 2019-11-17T05:19:27.642983+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module 2019-11-17T05:19:27.642985+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level) 2019-11-17T05:19:27.642987+00:00 app[web.1]: File "", line 994, in _gcd_import 2019-11-17T05:19:27.642988+00:00 app[web.1]: File "", line 971, in _find_and_load 2019-11-17T05:19:27.642990+00:00 app[web.1]: File "", line 953, in _find_and_load_unlocked 2019-11-17T05:19:27.642994+00:00 app[web.1]: ModuleNotFoundError: No module named 'application' 2019-11-17T05:19:27.643170+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [11] [INFO] Worker exiting (pid: 11) 2019-11-17T05:19:27.682204+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [4] [INFO] Shutting down: Master 2019-11-17T05:19:27.682293+00:00 app[web.1]: [2019-11-17 05:19:27 +0000] [4] [INFO] Reason: Worker failed to boot. 2019-11-17T05:19:27.742185+00:00 heroku[web.1]: Process exited with status 3 2019-11-17T05:19:28.000000+00:00 app[api]: Build succeeded 2019-11-17T05:21:57.875588+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ny-cab-fare-prediction-api.herokuapp.com request_id=cf5e1a0c-7b15-4344-a7d6-1e9d18950322 fwd="103.5.134.31" dyno= connect= service= status=503 bytes= protocol=https 2019-11-17T05:21:58.581392+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ny-cab-fare-prediction-api.herokuapp.com request_id=3ab91fae-db55-4a87-a571-64dc5d3dafb9 fwd="103.5.134.31" dyno= connect= service= status=503 bytes= protocol=https

1
please add application code structure and Procefile info. This error message doesn't really help us understand your problem. - Srikanth Chekuri
please find the files which I tried to create the app at github.com/yegavintin/cab-fare-prediction-practice - yegavintin
actually totally new to this field, was just watching some youtube videos to deploy a built ML model on Heroku through flask but got frequent errors - yegavintin

1 Answers

1
votes

Not sure why you have web: gunicorn application:app this in Procefile. Your repo doesn't have application module.

Please change you Procfile contents to web: gunicorn app:app.