gunicorn worker failed to boot












1















I am trying to open an app with Heroku. The following is the error log.



PS C:PythonProgramsmysitedemo> heroku logs --tail

2018-11-25T19:02:21.195848+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.195850+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.195852+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.195856+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.195858+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.195860+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.195862+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.195864+00:00 app[web.1]: return self.load_wsgiapp()



2018-11-25T19:02:21.195865+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.195868+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.195870+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.195871+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.195873+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.195874+00:00 app[web.1]:

2018-11-25T19:02:21.195876+00:00 app[web.1]: ^

2018-11-25T19:02:21.195917+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.196233+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:02:21.297175+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:21.297179+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.297181+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:21.297183+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:21.297185+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.297187+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.297189+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.297190+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.297192+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.297194+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.297196+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.297198+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:21.297200+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.297202+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.297203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.297205+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.297206+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.297208+00:00 app[web.1]:

2018-11-25T19:02:21.297210+00:00 app[web.1]: ^

2018-11-25T19:02:21.297211+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.297361+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340411+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:02:21.340917+00:00 app[web.1]: self.sleep()

2018-11-25T19:02:21.340934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:02:21.341372+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)



2018-11-25T19:02:21.341379+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.341632+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.341637+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.341971+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.342042+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.342049+00:00 app[web.1]:

2018-11-25T19:02:21.342051+00:00 app[web.1]: During handling of the above exception, another exception occurred:

2018-11-25T19:02:21.342052+00:00 app[web.1]:

2018-11-25T19:02:21.342054+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.342056+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>

2018-11-25T19:02:21.342179+00:00 app[web.1]: sys.exit(run())

2018-11-25T19:02:21.342184+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:02:21.342338+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

2018-11-25T19:02:21.342341+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:02:21.342566+00:00 app[web.1]: super(Application, self).run()

2018-11-25T19:02:21.342568+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:02:21.342714+00:00 app[web.1]: Arbiter(self).run()

2018-11-25T19:02:21.342720+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:02:21.342933+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:02:21.342939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:02:21.343205+00:00 app[web.1]: self.stop()

2018-11-25T19:02:21.343208+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:02:21.343506+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:02:21.343509+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.343712+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.343717+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.344061+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.344095+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.454244+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:02:31.103999+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:02:30.000000+00:00 app[api]: Build succeeded

2018-11-25T19:02:34.064741+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064763+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:34.064765+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:34.064767+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:34.064769+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:34.064771+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:34.064772+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:34.064774+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi



2018-11-25T19:02:34.064775+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:34.064780+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:34.064782+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:34.064783+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:34.064785+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:34.064786+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:34.064788+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:34.064789+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:34.064791+00:00 app[web.1]:

2018-11-25T19:02:34.064792+00:00 app[web.1]: ^

2018-11-25T19:02:34.064794+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:34.064795+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:34.220738+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Shutting down: Master

2018-11-25T19:02:34.220743+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Reason: Worker failed to boot.

2018-11-25T19:02:34.354918+00:00 heroku[web.1]: State changed from starting to crashed

2018-11-25T19:02:57.984656+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=katyjosapp.herokuapp.com request_id=fefbfee6-b4ed-40a6-b745-492565340b51 fwd="24.56.217.129" dyno

= connect= service= status=503 bytes= protocol=https

2018-11-25T19:02:58.684235+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=katyjosapp.herokuapp.com request_id=5e3a604e-316b-4cec-b19d-eae46b915384 fwd="24.56.21

7.129" dyno= connect= service= status=503 bytes= protocol=https

2018-11-25T19:28:33.780279+00:00 heroku[web.1]: State changed from crashed to starting

2018-11-25T19:28:45.697251+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:28:48.579126+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Starting gunicorn 19.9.0

2018-11-25T19:28:48.579996+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Listening at: http://0.0.0.0:8846 (4)

2018-11-25T19:28:48.580150+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Using worker: sync

2018-11-25T19:28:48.595528+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [10] [INFO] Booting worker with pid: 10

2018-11-25T19:28:48.641751+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [11] [INFO] Booting worker with pid: 11

2018-11-25T19:28:49.113220+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:28:49.113258+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.113261+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.113263+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.113264+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.113266+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.113268+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.113269+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.113271+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.113273+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.113274+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.113276+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.113277+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.113279+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.113281+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.113282+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.113284+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.113286+00:00 app[web.1]:

2018-11-25T19:28:49.113288+00:00 app[web.1]: ^



2018-11-25T19:28:49.113289+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.113291+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:28:49.461812+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [ERROR] Exception in worker process

2018-11-25T19:28:49.461829+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.461832+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.461834+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.461835+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.461837+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.461839+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.461841+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.461843+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.461844+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.461846+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.461848+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.461849+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.461851+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.461853+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.461854+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.461856+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.461858+00:00 app[web.1]:

2018-11-25T19:28:49.461860+00:00 app[web.1]: ^

2018-11-25T19:28:49.461931+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.462982+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:28:49.609662+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.609671+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:28:49.613569+00:00 app[web.1]: self.sleep()

2018-11-25T19:28:49.613610+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:28:49.613995+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)

2018-11-25T19:28:49.614031+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:28:49.614321+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.614354+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:28:49.614769+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.614937+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.614962+00:00 app[web.1]:

2018-11-25T19:28:49.614965+00:00 app[web.1]: Duaceback (most recent call last):

ring handling of the above exception, another ele "/app/.heroku/python/bin/gunicorn", line 11, in <module>

xception occurred: s.exit(run())

2018-11-25T19:28:49.614966+00:00 app[web.1]: le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:28:49.614994+00:00 app[web.1]: TrGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

aceback (most recent call last): le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:28:49.615023+00:00 app[web.1]: Fiper(Application, self).run()

le "/app/.heroku/python/bin/gunicorn", line 11,le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

in <module> biter(self).run()



2018-11-25T19:28:49.619467+00:00 app[web.1]: syle "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

s.exit(run()) lf.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:28:49.619525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

le "/app/.heroku/python/lib/python3.7/site-packlf.stop()

ages/gunicorn/app/wsgiapp.py", line 61, in run le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:28:49.619921+00:00 app[web.1]: WSme.sleep(0.1)

GIApplication("%(prog)s [OPTIONS] [APP_MODULE]"le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

).run() lf.reap_workers()

2018-11-25T19:28:49.619953+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

le "/app/.heroku/python/lib/python3.7/site-packise HaltServer(reason, self.WORKER_BOOT_ERROR)

ages/gunicorn/app/base.py", line 223, in run nicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.620314+00:00 app[web.1]: su Process exited with status 1

per(Application, self).run() State changed from starting to crashed

2018-11-25T19:28:49.620344+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:28:49.620641+00:00 app[web.1]: Ar

biter(self).run()

2018-11-25T19:28:49.620672+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:28:49.621035+00:00 app[web.1]: se

lf.halt(reason=inst.reason, exit_status=inst.ex

it_status)

2018-11-25T19:28:49.621079+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:28:49.621521+00:00 app[web.1]: self.stop()

2018-11-25T19:28:49.621551+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in st

op

2018-11-25T19:28:49.622034+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:28:49.622065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in ha

ndle_chld

2018-11-25T19:28:49.623053+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.623083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in re

ap_workers

2018-11-25T19:28:49.625273+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.625645+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.780852+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:28:49.802154+00:00 heroku[web.1]: State changed from starting to crashed

! Logs eventsource failed with: 401 Unauthorized


How can I fix this?



Edit: Ok, here is my main script file. Like I said in the comments, there are more files where the issue might be.



from flask import Flask, render_template
app = Flask(__name__)

@app.route('/')
def home():
return render_template("home.html")

@app.route('/about/')
def about():
return render_template("about.html")
if __name__=="__main__":
app.run(debug=True)


Windows 10, using Atom editor, Python 3.7.0










share|improve this question




















  • 2





    We can't help much without seeing your code. Please add a Minimal, Complete, and Verifiable example.

    – Chris
    Nov 25 '18 at 22:59











  • Hey I'm a bit new to this, and there are a few files involved. Here is the script of the app file. Please let me know if you need to see all the files. from flask import Flask, render_template app = Flask(name) @app.route('/') def home(): return render_template("home.html") @app.route('/about/') def about(): return render_template("about.html") if name__=="__main": app.run(debug=True)

    – K.J. Bird
    Nov 25 '18 at 23:14













  • It's okay, we were all new at this sometime. It's basically impossible to read code in comments (especially Python, where whitespace is semantically important). Please edit your question and add the code there. After pasting, select it and press Ctrl+K or click the {} button to format it as code.

    – Chris
    Nov 25 '18 at 23:15













  • Hi @Chris I edited the post with the code from the main script file.

    – K.J. Bird
    Nov 25 '18 at 23:46
















1















I am trying to open an app with Heroku. The following is the error log.



PS C:PythonProgramsmysitedemo> heroku logs --tail

2018-11-25T19:02:21.195848+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.195850+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.195852+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.195856+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.195858+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.195860+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.195862+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.195864+00:00 app[web.1]: return self.load_wsgiapp()



2018-11-25T19:02:21.195865+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.195868+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.195870+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.195871+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.195873+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.195874+00:00 app[web.1]:

2018-11-25T19:02:21.195876+00:00 app[web.1]: ^

2018-11-25T19:02:21.195917+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.196233+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:02:21.297175+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:21.297179+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.297181+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:21.297183+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:21.297185+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.297187+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.297189+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.297190+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.297192+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.297194+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.297196+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.297198+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:21.297200+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.297202+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.297203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.297205+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.297206+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.297208+00:00 app[web.1]:

2018-11-25T19:02:21.297210+00:00 app[web.1]: ^

2018-11-25T19:02:21.297211+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.297361+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340411+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:02:21.340917+00:00 app[web.1]: self.sleep()

2018-11-25T19:02:21.340934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:02:21.341372+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)



2018-11-25T19:02:21.341379+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.341632+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.341637+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.341971+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.342042+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.342049+00:00 app[web.1]:

2018-11-25T19:02:21.342051+00:00 app[web.1]: During handling of the above exception, another exception occurred:

2018-11-25T19:02:21.342052+00:00 app[web.1]:

2018-11-25T19:02:21.342054+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.342056+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>

2018-11-25T19:02:21.342179+00:00 app[web.1]: sys.exit(run())

2018-11-25T19:02:21.342184+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:02:21.342338+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

2018-11-25T19:02:21.342341+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:02:21.342566+00:00 app[web.1]: super(Application, self).run()

2018-11-25T19:02:21.342568+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:02:21.342714+00:00 app[web.1]: Arbiter(self).run()

2018-11-25T19:02:21.342720+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:02:21.342933+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:02:21.342939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:02:21.343205+00:00 app[web.1]: self.stop()

2018-11-25T19:02:21.343208+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:02:21.343506+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:02:21.343509+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.343712+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.343717+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.344061+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.344095+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.454244+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:02:31.103999+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:02:30.000000+00:00 app[api]: Build succeeded

2018-11-25T19:02:34.064741+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064763+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:34.064765+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:34.064767+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:34.064769+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:34.064771+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:34.064772+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:34.064774+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi



2018-11-25T19:02:34.064775+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:34.064780+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:34.064782+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:34.064783+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:34.064785+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:34.064786+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:34.064788+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:34.064789+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:34.064791+00:00 app[web.1]:

2018-11-25T19:02:34.064792+00:00 app[web.1]: ^

2018-11-25T19:02:34.064794+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:34.064795+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:34.220738+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Shutting down: Master

2018-11-25T19:02:34.220743+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Reason: Worker failed to boot.

2018-11-25T19:02:34.354918+00:00 heroku[web.1]: State changed from starting to crashed

2018-11-25T19:02:57.984656+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=katyjosapp.herokuapp.com request_id=fefbfee6-b4ed-40a6-b745-492565340b51 fwd="24.56.217.129" dyno

= connect= service= status=503 bytes= protocol=https

2018-11-25T19:02:58.684235+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=katyjosapp.herokuapp.com request_id=5e3a604e-316b-4cec-b19d-eae46b915384 fwd="24.56.21

7.129" dyno= connect= service= status=503 bytes= protocol=https

2018-11-25T19:28:33.780279+00:00 heroku[web.1]: State changed from crashed to starting

2018-11-25T19:28:45.697251+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:28:48.579126+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Starting gunicorn 19.9.0

2018-11-25T19:28:48.579996+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Listening at: http://0.0.0.0:8846 (4)

2018-11-25T19:28:48.580150+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Using worker: sync

2018-11-25T19:28:48.595528+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [10] [INFO] Booting worker with pid: 10

2018-11-25T19:28:48.641751+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [11] [INFO] Booting worker with pid: 11

2018-11-25T19:28:49.113220+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:28:49.113258+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.113261+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.113263+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.113264+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.113266+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.113268+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.113269+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.113271+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.113273+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.113274+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.113276+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.113277+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.113279+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.113281+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.113282+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.113284+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.113286+00:00 app[web.1]:

2018-11-25T19:28:49.113288+00:00 app[web.1]: ^



2018-11-25T19:28:49.113289+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.113291+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:28:49.461812+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [ERROR] Exception in worker process

2018-11-25T19:28:49.461829+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.461832+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.461834+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.461835+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.461837+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.461839+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.461841+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.461843+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.461844+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.461846+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.461848+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.461849+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.461851+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.461853+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.461854+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.461856+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.461858+00:00 app[web.1]:

2018-11-25T19:28:49.461860+00:00 app[web.1]: ^

2018-11-25T19:28:49.461931+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.462982+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:28:49.609662+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.609671+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:28:49.613569+00:00 app[web.1]: self.sleep()

2018-11-25T19:28:49.613610+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:28:49.613995+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)

2018-11-25T19:28:49.614031+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:28:49.614321+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.614354+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:28:49.614769+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.614937+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.614962+00:00 app[web.1]:

2018-11-25T19:28:49.614965+00:00 app[web.1]: Duaceback (most recent call last):

ring handling of the above exception, another ele "/app/.heroku/python/bin/gunicorn", line 11, in <module>

xception occurred: s.exit(run())

2018-11-25T19:28:49.614966+00:00 app[web.1]: le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:28:49.614994+00:00 app[web.1]: TrGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

aceback (most recent call last): le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:28:49.615023+00:00 app[web.1]: Fiper(Application, self).run()

le "/app/.heroku/python/bin/gunicorn", line 11,le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

in <module> biter(self).run()



2018-11-25T19:28:49.619467+00:00 app[web.1]: syle "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

s.exit(run()) lf.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:28:49.619525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

le "/app/.heroku/python/lib/python3.7/site-packlf.stop()

ages/gunicorn/app/wsgiapp.py", line 61, in run le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:28:49.619921+00:00 app[web.1]: WSme.sleep(0.1)

GIApplication("%(prog)s [OPTIONS] [APP_MODULE]"le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

).run() lf.reap_workers()

2018-11-25T19:28:49.619953+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

le "/app/.heroku/python/lib/python3.7/site-packise HaltServer(reason, self.WORKER_BOOT_ERROR)

ages/gunicorn/app/base.py", line 223, in run nicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.620314+00:00 app[web.1]: su Process exited with status 1

per(Application, self).run() State changed from starting to crashed

2018-11-25T19:28:49.620344+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:28:49.620641+00:00 app[web.1]: Ar

biter(self).run()

2018-11-25T19:28:49.620672+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:28:49.621035+00:00 app[web.1]: se

lf.halt(reason=inst.reason, exit_status=inst.ex

it_status)

2018-11-25T19:28:49.621079+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:28:49.621521+00:00 app[web.1]: self.stop()

2018-11-25T19:28:49.621551+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in st

op

2018-11-25T19:28:49.622034+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:28:49.622065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in ha

ndle_chld

2018-11-25T19:28:49.623053+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.623083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in re

ap_workers

2018-11-25T19:28:49.625273+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.625645+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.780852+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:28:49.802154+00:00 heroku[web.1]: State changed from starting to crashed

! Logs eventsource failed with: 401 Unauthorized


How can I fix this?



Edit: Ok, here is my main script file. Like I said in the comments, there are more files where the issue might be.



from flask import Flask, render_template
app = Flask(__name__)

@app.route('/')
def home():
return render_template("home.html")

@app.route('/about/')
def about():
return render_template("about.html")
if __name__=="__main__":
app.run(debug=True)


Windows 10, using Atom editor, Python 3.7.0










share|improve this question




















  • 2





    We can't help much without seeing your code. Please add a Minimal, Complete, and Verifiable example.

    – Chris
    Nov 25 '18 at 22:59











  • Hey I'm a bit new to this, and there are a few files involved. Here is the script of the app file. Please let me know if you need to see all the files. from flask import Flask, render_template app = Flask(name) @app.route('/') def home(): return render_template("home.html") @app.route('/about/') def about(): return render_template("about.html") if name__=="__main": app.run(debug=True)

    – K.J. Bird
    Nov 25 '18 at 23:14













  • It's okay, we were all new at this sometime. It's basically impossible to read code in comments (especially Python, where whitespace is semantically important). Please edit your question and add the code there. After pasting, select it and press Ctrl+K or click the {} button to format it as code.

    – Chris
    Nov 25 '18 at 23:15













  • Hi @Chris I edited the post with the code from the main script file.

    – K.J. Bird
    Nov 25 '18 at 23:46














1












1








1








I am trying to open an app with Heroku. The following is the error log.



PS C:PythonProgramsmysitedemo> heroku logs --tail

2018-11-25T19:02:21.195848+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.195850+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.195852+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.195856+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.195858+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.195860+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.195862+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.195864+00:00 app[web.1]: return self.load_wsgiapp()



2018-11-25T19:02:21.195865+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.195868+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.195870+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.195871+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.195873+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.195874+00:00 app[web.1]:

2018-11-25T19:02:21.195876+00:00 app[web.1]: ^

2018-11-25T19:02:21.195917+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.196233+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:02:21.297175+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:21.297179+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.297181+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:21.297183+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:21.297185+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.297187+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.297189+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.297190+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.297192+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.297194+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.297196+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.297198+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:21.297200+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.297202+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.297203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.297205+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.297206+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.297208+00:00 app[web.1]:

2018-11-25T19:02:21.297210+00:00 app[web.1]: ^

2018-11-25T19:02:21.297211+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.297361+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340411+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:02:21.340917+00:00 app[web.1]: self.sleep()

2018-11-25T19:02:21.340934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:02:21.341372+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)



2018-11-25T19:02:21.341379+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.341632+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.341637+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.341971+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.342042+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.342049+00:00 app[web.1]:

2018-11-25T19:02:21.342051+00:00 app[web.1]: During handling of the above exception, another exception occurred:

2018-11-25T19:02:21.342052+00:00 app[web.1]:

2018-11-25T19:02:21.342054+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.342056+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>

2018-11-25T19:02:21.342179+00:00 app[web.1]: sys.exit(run())

2018-11-25T19:02:21.342184+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:02:21.342338+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

2018-11-25T19:02:21.342341+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:02:21.342566+00:00 app[web.1]: super(Application, self).run()

2018-11-25T19:02:21.342568+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:02:21.342714+00:00 app[web.1]: Arbiter(self).run()

2018-11-25T19:02:21.342720+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:02:21.342933+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:02:21.342939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:02:21.343205+00:00 app[web.1]: self.stop()

2018-11-25T19:02:21.343208+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:02:21.343506+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:02:21.343509+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.343712+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.343717+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.344061+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.344095+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.454244+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:02:31.103999+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:02:30.000000+00:00 app[api]: Build succeeded

2018-11-25T19:02:34.064741+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064763+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:34.064765+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:34.064767+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:34.064769+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:34.064771+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:34.064772+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:34.064774+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi



2018-11-25T19:02:34.064775+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:34.064780+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:34.064782+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:34.064783+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:34.064785+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:34.064786+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:34.064788+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:34.064789+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:34.064791+00:00 app[web.1]:

2018-11-25T19:02:34.064792+00:00 app[web.1]: ^

2018-11-25T19:02:34.064794+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:34.064795+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:34.220738+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Shutting down: Master

2018-11-25T19:02:34.220743+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Reason: Worker failed to boot.

2018-11-25T19:02:34.354918+00:00 heroku[web.1]: State changed from starting to crashed

2018-11-25T19:02:57.984656+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=katyjosapp.herokuapp.com request_id=fefbfee6-b4ed-40a6-b745-492565340b51 fwd="24.56.217.129" dyno

= connect= service= status=503 bytes= protocol=https

2018-11-25T19:02:58.684235+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=katyjosapp.herokuapp.com request_id=5e3a604e-316b-4cec-b19d-eae46b915384 fwd="24.56.21

7.129" dyno= connect= service= status=503 bytes= protocol=https

2018-11-25T19:28:33.780279+00:00 heroku[web.1]: State changed from crashed to starting

2018-11-25T19:28:45.697251+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:28:48.579126+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Starting gunicorn 19.9.0

2018-11-25T19:28:48.579996+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Listening at: http://0.0.0.0:8846 (4)

2018-11-25T19:28:48.580150+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Using worker: sync

2018-11-25T19:28:48.595528+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [10] [INFO] Booting worker with pid: 10

2018-11-25T19:28:48.641751+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [11] [INFO] Booting worker with pid: 11

2018-11-25T19:28:49.113220+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:28:49.113258+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.113261+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.113263+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.113264+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.113266+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.113268+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.113269+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.113271+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.113273+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.113274+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.113276+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.113277+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.113279+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.113281+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.113282+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.113284+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.113286+00:00 app[web.1]:

2018-11-25T19:28:49.113288+00:00 app[web.1]: ^



2018-11-25T19:28:49.113289+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.113291+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:28:49.461812+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [ERROR] Exception in worker process

2018-11-25T19:28:49.461829+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.461832+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.461834+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.461835+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.461837+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.461839+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.461841+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.461843+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.461844+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.461846+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.461848+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.461849+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.461851+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.461853+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.461854+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.461856+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.461858+00:00 app[web.1]:

2018-11-25T19:28:49.461860+00:00 app[web.1]: ^

2018-11-25T19:28:49.461931+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.462982+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:28:49.609662+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.609671+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:28:49.613569+00:00 app[web.1]: self.sleep()

2018-11-25T19:28:49.613610+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:28:49.613995+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)

2018-11-25T19:28:49.614031+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:28:49.614321+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.614354+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:28:49.614769+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.614937+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.614962+00:00 app[web.1]:

2018-11-25T19:28:49.614965+00:00 app[web.1]: Duaceback (most recent call last):

ring handling of the above exception, another ele "/app/.heroku/python/bin/gunicorn", line 11, in <module>

xception occurred: s.exit(run())

2018-11-25T19:28:49.614966+00:00 app[web.1]: le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:28:49.614994+00:00 app[web.1]: TrGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

aceback (most recent call last): le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:28:49.615023+00:00 app[web.1]: Fiper(Application, self).run()

le "/app/.heroku/python/bin/gunicorn", line 11,le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

in <module> biter(self).run()



2018-11-25T19:28:49.619467+00:00 app[web.1]: syle "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

s.exit(run()) lf.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:28:49.619525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

le "/app/.heroku/python/lib/python3.7/site-packlf.stop()

ages/gunicorn/app/wsgiapp.py", line 61, in run le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:28:49.619921+00:00 app[web.1]: WSme.sleep(0.1)

GIApplication("%(prog)s [OPTIONS] [APP_MODULE]"le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

).run() lf.reap_workers()

2018-11-25T19:28:49.619953+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

le "/app/.heroku/python/lib/python3.7/site-packise HaltServer(reason, self.WORKER_BOOT_ERROR)

ages/gunicorn/app/base.py", line 223, in run nicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.620314+00:00 app[web.1]: su Process exited with status 1

per(Application, self).run() State changed from starting to crashed

2018-11-25T19:28:49.620344+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:28:49.620641+00:00 app[web.1]: Ar

biter(self).run()

2018-11-25T19:28:49.620672+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:28:49.621035+00:00 app[web.1]: se

lf.halt(reason=inst.reason, exit_status=inst.ex

it_status)

2018-11-25T19:28:49.621079+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:28:49.621521+00:00 app[web.1]: self.stop()

2018-11-25T19:28:49.621551+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in st

op

2018-11-25T19:28:49.622034+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:28:49.622065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in ha

ndle_chld

2018-11-25T19:28:49.623053+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.623083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in re

ap_workers

2018-11-25T19:28:49.625273+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.625645+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.780852+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:28:49.802154+00:00 heroku[web.1]: State changed from starting to crashed

! Logs eventsource failed with: 401 Unauthorized


How can I fix this?



Edit: Ok, here is my main script file. Like I said in the comments, there are more files where the issue might be.



from flask import Flask, render_template
app = Flask(__name__)

@app.route('/')
def home():
return render_template("home.html")

@app.route('/about/')
def about():
return render_template("about.html")
if __name__=="__main__":
app.run(debug=True)


Windows 10, using Atom editor, Python 3.7.0










share|improve this question
















I am trying to open an app with Heroku. The following is the error log.



PS C:PythonProgramsmysitedemo> heroku logs --tail

2018-11-25T19:02:21.195848+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.195850+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.195852+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.195856+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.195858+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.195860+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.195862+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.195864+00:00 app[web.1]: return self.load_wsgiapp()



2018-11-25T19:02:21.195865+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.195868+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.195870+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.195871+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.195873+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.195874+00:00 app[web.1]:

2018-11-25T19:02:21.195876+00:00 app[web.1]: ^

2018-11-25T19:02:21.195917+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.196233+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:02:21.297175+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:21.297179+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.297181+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:21.297183+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:21.297185+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:21.297187+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:21.297189+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:21.297190+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:21.297192+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:02:21.297194+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:21.297196+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:21.297198+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:21.297200+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:21.297202+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:21.297203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:21.297205+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:21.297206+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:21.297208+00:00 app[web.1]:

2018-11-25T19:02:21.297210+00:00 app[web.1]: ^

2018-11-25T19:02:21.297211+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:21.297361+00:00 app[web.1]: [2018-11-25 19:02:21 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340381+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.340411+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:02:21.340917+00:00 app[web.1]: self.sleep()

2018-11-25T19:02:21.340934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:02:21.341372+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)



2018-11-25T19:02:21.341379+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.341632+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.341637+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.341971+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.342042+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.342049+00:00 app[web.1]:

2018-11-25T19:02:21.342051+00:00 app[web.1]: During handling of the above exception, another exception occurred:

2018-11-25T19:02:21.342052+00:00 app[web.1]:

2018-11-25T19:02:21.342054+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:21.342056+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>

2018-11-25T19:02:21.342179+00:00 app[web.1]: sys.exit(run())

2018-11-25T19:02:21.342184+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:02:21.342338+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

2018-11-25T19:02:21.342341+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:02:21.342566+00:00 app[web.1]: super(Application, self).run()

2018-11-25T19:02:21.342568+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:02:21.342714+00:00 app[web.1]: Arbiter(self).run()

2018-11-25T19:02:21.342720+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:02:21.342933+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:02:21.342939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:02:21.343205+00:00 app[web.1]: self.stop()

2018-11-25T19:02:21.343208+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:02:21.343506+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:02:21.343509+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:02:21.343712+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:02:21.343717+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:02:21.344061+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:02:21.344095+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:02:21.454244+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:02:31.103999+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:02:30.000000+00:00 app[api]: Build succeeded

2018-11-25T19:02:34.064741+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064761+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:02:34.064763+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:02:34.064765+00:00 app[web.1]: worker.init_process()

2018-11-25T19:02:34.064767+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:02:34.064769+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:02:34.064771+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:02:34.064772+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:02:34.064774+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi



2018-11-25T19:02:34.064775+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:02:34.064780+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:02:34.064782+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:02:34.064783+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:02:34.064785+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:02:34.064786+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:02:34.064788+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:02:34.064789+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:02:34.064791+00:00 app[web.1]:

2018-11-25T19:02:34.064792+00:00 app[web.1]: ^

2018-11-25T19:02:34.064794+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:02:34.064795+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:02:34.220738+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Shutting down: Master

2018-11-25T19:02:34.220743+00:00 app[web.1]: [2018-11-25 19:02:34 +0000] [4] [INFO] Reason: Worker failed to boot.

2018-11-25T19:02:34.354918+00:00 heroku[web.1]: State changed from starting to crashed

2018-11-25T19:02:57.984656+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=katyjosapp.herokuapp.com request_id=fefbfee6-b4ed-40a6-b745-492565340b51 fwd="24.56.217.129" dyno

= connect= service= status=503 bytes= protocol=https

2018-11-25T19:02:58.684235+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=katyjosapp.herokuapp.com request_id=5e3a604e-316b-4cec-b19d-eae46b915384 fwd="24.56.21

7.129" dyno= connect= service= status=503 bytes= protocol=https

2018-11-25T19:28:33.780279+00:00 heroku[web.1]: State changed from crashed to starting

2018-11-25T19:28:45.697251+00:00 heroku[web.1]: Starting process with command `gunicorn script1: app`

2018-11-25T19:28:48.579126+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Starting gunicorn 19.9.0

2018-11-25T19:28:48.579996+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Listening at: http://0.0.0.0:8846 (4)

2018-11-25T19:28:48.580150+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [4] [INFO] Using worker: sync

2018-11-25T19:28:48.595528+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [10] [INFO] Booting worker with pid: 10

2018-11-25T19:28:48.641751+00:00 app[web.1]: [2018-11-25 19:28:48 +0000] [11] [INFO] Booting worker with pid: 11

2018-11-25T19:28:49.113220+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [ERROR] Exception in worker process

2018-11-25T19:28:49.113258+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.113261+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.113263+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.113264+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.113266+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.113268+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.113269+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.113271+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.113273+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.113274+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.113276+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.113277+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.113279+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.113281+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.113282+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.113284+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.113286+00:00 app[web.1]:

2018-11-25T19:28:49.113288+00:00 app[web.1]: ^



2018-11-25T19:28:49.113289+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.113291+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [11] [INFO] Worker exiting (pid: 11)

2018-11-25T19:28:49.461812+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [ERROR] Exception in worker process

2018-11-25T19:28:49.461829+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.461832+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2018-11-25T19:28:49.461834+00:00 app[web.1]: worker.init_process()

2018-11-25T19:28:49.461835+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process

2018-11-25T19:28:49.461837+00:00 app[web.1]: self.load_wsgi()

2018-11-25T19:28:49.461839+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi

2018-11-25T19:28:49.461841+00:00 app[web.1]: self.wsgi = self.app.wsgi()

2018-11-25T19:28:49.461843+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi

2018-11-25T19:28:49.461844+00:00 app[web.1]: self.callable = self.load()

2018-11-25T19:28:49.461846+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load

2018-11-25T19:28:49.461848+00:00 app[web.1]: return self.load_wsgiapp()

2018-11-25T19:28:49.461849+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp

2018-11-25T19:28:49.461851+00:00 app[web.1]: return util.import_app(self.app_uri)

2018-11-25T19:28:49.461853+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app

2018-11-25T19:28:49.461854+00:00 app[web.1]: app = eval(obj, vars(mod))

2018-11-25T19:28:49.461856+00:00 app[web.1]: File "<string>", line 0

2018-11-25T19:28:49.461858+00:00 app[web.1]:

2018-11-25T19:28:49.461860+00:00 app[web.1]: ^

2018-11-25T19:28:49.461931+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing

2018-11-25T19:28:49.462982+00:00 app[web.1]: [2018-11-25 19:28:49 +0000] [10] [INFO] Worker exiting (pid: 10)

2018-11-25T19:28:49.609662+00:00 app[web.1]: Traceback (most recent call last):

2018-11-25T19:28:49.609671+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run

2018-11-25T19:28:49.613569+00:00 app[web.1]: self.sleep()

2018-11-25T19:28:49.613610+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep

2018-11-25T19:28:49.613995+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)

2018-11-25T19:28:49.614031+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

2018-11-25T19:28:49.614321+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.614354+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

2018-11-25T19:28:49.614769+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.614937+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.614962+00:00 app[web.1]:

2018-11-25T19:28:49.614965+00:00 app[web.1]: Duaceback (most recent call last):

ring handling of the above exception, another ele "/app/.heroku/python/bin/gunicorn", line 11, in <module>

xception occurred: s.exit(run())

2018-11-25T19:28:49.614966+00:00 app[web.1]: le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run

2018-11-25T19:28:49.614994+00:00 app[web.1]: TrGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()

aceback (most recent call last): le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run

2018-11-25T19:28:49.615023+00:00 app[web.1]: Fiper(Application, self).run()

le "/app/.heroku/python/bin/gunicorn", line 11,le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run

in <module> biter(self).run()



2018-11-25T19:28:49.619467+00:00 app[web.1]: syle "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run

s.exit(run()) lf.halt(reason=inst.reason, exit_status=inst.exit_status)

2018-11-25T19:28:49.619525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt

le "/app/.heroku/python/lib/python3.7/site-packlf.stop()

ages/gunicorn/app/wsgiapp.py", line 61, in run le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop

2018-11-25T19:28:49.619921+00:00 app[web.1]: WSme.sleep(0.1)

GIApplication("%(prog)s [OPTIONS] [APP_MODULE]"le "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld

).run() lf.reap_workers()

2018-11-25T19:28:49.619953+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers

le "/app/.heroku/python/lib/python3.7/site-packise HaltServer(reason, self.WORKER_BOOT_ERROR)

ages/gunicorn/app/base.py", line 223, in run nicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.620314+00:00 app[web.1]: su Process exited with status 1

per(Application, self).run() State changed from starting to crashed

2018-11-25T19:28:49.620344+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/app/base.py", line 72, in run

2018-11-25T19:28:49.620641+00:00 app[web.1]: Ar

biter(self).run()

2018-11-25T19:28:49.620672+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 232, in run

2018-11-25T19:28:49.621035+00:00 app[web.1]: se

lf.halt(reason=inst.reason, exit_status=inst.ex

it_status)

2018-11-25T19:28:49.621079+00:00 app[web.1]: Fi

le "/app/.heroku/python/lib/python3.7/site-pack

ages/gunicorn/arbiter.py", line 345, in halt

2018-11-25T19:28:49.621521+00:00 app[web.1]: self.stop()

2018-11-25T19:28:49.621551+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in st

op

2018-11-25T19:28:49.622034+00:00 app[web.1]: time.sleep(0.1)

2018-11-25T19:28:49.622065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in ha

ndle_chld

2018-11-25T19:28:49.623053+00:00 app[web.1]: self.reap_workers()

2018-11-25T19:28:49.623083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in re

ap_workers

2018-11-25T19:28:49.625273+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

2018-11-25T19:28:49.625645+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

2018-11-25T19:28:49.780852+00:00 heroku[web.1]: Process exited with status 1

2018-11-25T19:28:49.802154+00:00 heroku[web.1]: State changed from starting to crashed

! Logs eventsource failed with: 401 Unauthorized


How can I fix this?



Edit: Ok, here is my main script file. Like I said in the comments, there are more files where the issue might be.



from flask import Flask, render_template
app = Flask(__name__)

@app.route('/')
def home():
return render_template("home.html")

@app.route('/about/')
def about():
return render_template("about.html")
if __name__=="__main__":
app.run(debug=True)


Windows 10, using Atom editor, Python 3.7.0







python heroku atom-editor gunicorn






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 23:57









Robert Columbia

5,66982433




5,66982433










asked Nov 25 '18 at 22:48









K.J. BirdK.J. Bird

62




62








  • 2





    We can't help much without seeing your code. Please add a Minimal, Complete, and Verifiable example.

    – Chris
    Nov 25 '18 at 22:59











  • Hey I'm a bit new to this, and there are a few files involved. Here is the script of the app file. Please let me know if you need to see all the files. from flask import Flask, render_template app = Flask(name) @app.route('/') def home(): return render_template("home.html") @app.route('/about/') def about(): return render_template("about.html") if name__=="__main": app.run(debug=True)

    – K.J. Bird
    Nov 25 '18 at 23:14













  • It's okay, we were all new at this sometime. It's basically impossible to read code in comments (especially Python, where whitespace is semantically important). Please edit your question and add the code there. After pasting, select it and press Ctrl+K or click the {} button to format it as code.

    – Chris
    Nov 25 '18 at 23:15













  • Hi @Chris I edited the post with the code from the main script file.

    – K.J. Bird
    Nov 25 '18 at 23:46














  • 2





    We can't help much without seeing your code. Please add a Minimal, Complete, and Verifiable example.

    – Chris
    Nov 25 '18 at 22:59











  • Hey I'm a bit new to this, and there are a few files involved. Here is the script of the app file. Please let me know if you need to see all the files. from flask import Flask, render_template app = Flask(name) @app.route('/') def home(): return render_template("home.html") @app.route('/about/') def about(): return render_template("about.html") if name__=="__main": app.run(debug=True)

    – K.J. Bird
    Nov 25 '18 at 23:14













  • It's okay, we were all new at this sometime. It's basically impossible to read code in comments (especially Python, where whitespace is semantically important). Please edit your question and add the code there. After pasting, select it and press Ctrl+K or click the {} button to format it as code.

    – Chris
    Nov 25 '18 at 23:15













  • Hi @Chris I edited the post with the code from the main script file.

    – K.J. Bird
    Nov 25 '18 at 23:46








2




2





We can't help much without seeing your code. Please add a Minimal, Complete, and Verifiable example.

– Chris
Nov 25 '18 at 22:59





We can't help much without seeing your code. Please add a Minimal, Complete, and Verifiable example.

– Chris
Nov 25 '18 at 22:59













Hey I'm a bit new to this, and there are a few files involved. Here is the script of the app file. Please let me know if you need to see all the files. from flask import Flask, render_template app = Flask(name) @app.route('/') def home(): return render_template("home.html") @app.route('/about/') def about(): return render_template("about.html") if name__=="__main": app.run(debug=True)

– K.J. Bird
Nov 25 '18 at 23:14







Hey I'm a bit new to this, and there are a few files involved. Here is the script of the app file. Please let me know if you need to see all the files. from flask import Flask, render_template app = Flask(name) @app.route('/') def home(): return render_template("home.html") @app.route('/about/') def about(): return render_template("about.html") if name__=="__main": app.run(debug=True)

– K.J. Bird
Nov 25 '18 at 23:14















It's okay, we were all new at this sometime. It's basically impossible to read code in comments (especially Python, where whitespace is semantically important). Please edit your question and add the code there. After pasting, select it and press Ctrl+K or click the {} button to format it as code.

– Chris
Nov 25 '18 at 23:15







It's okay, we were all new at this sometime. It's basically impossible to read code in comments (especially Python, where whitespace is semantically important). Please edit your question and add the code there. After pasting, select it and press Ctrl+K or click the {} button to format it as code.

– Chris
Nov 25 '18 at 23:15















Hi @Chris I edited the post with the code from the main script file.

– K.J. Bird
Nov 25 '18 at 23:46





Hi @Chris I edited the post with the code from the main script file.

– K.J. Bird
Nov 25 '18 at 23:46












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53472780%2fgunicorn-worker-failed-to-boot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53472780%2fgunicorn-worker-failed-to-boot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

To store a contact into the json file from server.js file using a class in NodeJS

Redirect URL with Chrome Remote Debugging Android Devices

Dieringhausen