Dash App Deploy Error H10

app2.py

import dash

import dash_core_components as dcc

import dash_html_components as html

from dash.dependencies import Input, Output

import plotly.express as px

import pandas as pd

external_stylesheets = [’/chriddyp/pen/bWLwgP.css’]

app2 = dash.Dash(name, external_stylesheets=external_stylesheets)

server = app2.server

df = pd.read_csv(’://plotly.github.io/datasets/country_indicators.csv’)

available_indicators = df[‘Indicator Name’].unique()

app2.layout = html.Div([

html.Div([

    html.Div([

        dcc.Dropdown(

            id='xaxis-column',

            options=[{'label': i, 'value': i} for i in available_indicators],

            value='Fertility rate, total (births per woman)'

        ),

        dcc.RadioItems(

            id='xaxis-type',

            options=[{'label': i, 'value': i} for i in ['Linear', 'Log']],

            value='Linear',

            labelStyle={'display': 'inline-block'}

        )

    ],

    style={'width': '48%', 'display': 'inline-block'}),

    html.Div([

        dcc.Dropdown(

            id='yaxis-column',

            options=[{'label': i, 'value': i} for i in available_indicators],

            value='Life expectancy at birth, total (years)'

        ),

        dcc.RadioItems(

            id='yaxis-type',

            options=[{'label': i, 'value': i} for i in ['Linear', 'Log']],

            value='Linear',

            labelStyle={'display': 'inline-block'}

        )

    ],style={'width': '48%', 'float': 'right', 'display': 'inline-block'})

]),

dcc.Graph(id='indicator-graphic'),

dcc.Slider(

    id='year--slider',

    min=df['Year'].min(),

    max=df['Year'].max(),

    value=df['Year'].max(),

    marks={str(year): str(year) for year in df['Year'].unique()},

    step=None

)

])

@app2.callback(

Output('indicator-graphic', 'figure'),

Input('xaxis-column', 'value'),

Input('yaxis-column', 'value'),

Input('xaxis-type', 'value'),

Input('yaxis-type', 'value'),

Input('year--slider', 'value'))

def update_graph(xaxis_column_name, yaxis_column_name,

             xaxis_type, yaxis_type,

             year_value):

dff = df[df['Year'] == year_value]

fig = px.scatter(x=dff[dff['Indicator Name'] == xaxis_column_name]['Value'],

                 y=dff[dff['Indicator Name'] == yaxis_column_name]['Value'],

                 hover_name=dff[dff['Indicator Name'] == yaxis_column_name]['Country Name'])

fig.update_layout(margin={'l': 40, 'b': 40, 't': 10, 'r': 0}, hovermode='closest')

fig.update_xaxes(title=xaxis_column_name,

                 type='linear' if xaxis_type == 'Linear' else 'log')

fig.update_yaxes(title=yaxis_column_name,

                 type='linear' if yaxis_type == 'Linear' else 'log')

return fig

#if name == ‘main’:

app2.run_server(debug=True, port=8080)

.gitignore
venv

*.pyc

.env

.DS_Store

Procfile
web: gunicorn app2:server

requirements.txt
appdirs==1.4.4

Brotli==1.0.9

click==7.1.2

cycler==0.10.0

dash==1.19.0

dash-core-components==1.15.0

dash-extensions==0.0.45

dash-html-components==1.1.2

dash-renderer==1.9.0

dash-table==4.11.2

distlib==0.3.1

filelock==3.0.12

Flask==1.1.2

Flask-Caching==1.9.0

Flask-Compress==1.8.0

future==0.18.2

itsdangerous==1.1.0

Jinja2==2.11.3

kiwisolver==1.3.1

MarkupSafe==1.1.1

matplotlib==3.3.4

more-itertools==8.7.0

numpy==1.18.1

pandas==1.1.5

Pillow==8.1.0

plotly==4.14.3

pyparsing==2.4.7

python-dateutil==2.8.1

pytz==2021.1

retrying==1.3.3

six==1.15.0

source==1.2.0

virtualenv==20.4.2

Werkzeug==1.0.1

I am deploying a dash app example to Heroku, but I am keep getting H10 error.
I checked Procfile, and others. They seem correct.
The dash app itself works fine when I run it on a local server.

Please, help me solve this problem.

(venv) C:\Users\16124\Desktop\dash_app_example\dash-app2-example>heroku logs
2021-02-19T03:24:10.444865+00:00 app[web.1]: File “”, line 678, in exec_module
2021-02-19T03:24:10.444865+00:00 app[web.1]: File “”, line 219, in _call_with_frames_removed
2021-02-19T03:24:10.444866+00:00 app[web.1]: File “/app/app2.py”, line 5, in
2021-02-19T03:24:10.444866+00:00 app[web.1]: import plotly.express as px
2021-02-19T03:24:10.444867+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/plotly/express/init.py”, line 12, in
2021-02-19T03:24:10.444867+00:00 app[web.1]: Plotly express requires pandas to be installed."""
2021-02-19T03:24:10.444925+00:00 app[web.1]: ImportError: Plotly express requires pandas to be installed.
2021-02-19T03:24:10.445210+00:00 app[web.1]: [2021-02-19 03:24:10 +0000] [10] [ERROR] Exception in worker process
2021-02-19T03:24:10.445211+00:00 app[web.1]: Traceback (most recent call last):
2021-02-19T03:24:10.445211+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 583, in spawn_worker
2021-02-19T03:24:10.445212+00:00 app[web.1]: worker.init_process()
2021-02-19T03:24:10.445212+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py”, line 119, in init_process
2021-02-19T03:24:10.445212+00:00 app[web.1]: self.load_wsgi()
2021-02-19T03:24:10.445213+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py”, line 144, in load_wsgi
2021-02-19T03:24:10.445213+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-02-19T03:24:10.445213+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py”, line 67, in wsgi
2021-02-19T03:24:10.445214+00:00 app[web.1]: self.callable = self.load()
2021-02-19T03:24:10.445220+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py”, line 49, in load
2021-02-19T03:24:10.445220+00:00 app[web.1]: return self.load_wsgiapp()
2021-02-19T03:24:10.445220+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py”, line 39, in load_wsgiapp
2021-02-19T03:24:10.445221+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-02-19T03:24:10.445221+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py”, line 358, in import_app
2021-02-19T03:24:10.445222+00:00 app[web.1]: mod = importlib.import_module(module)
2021-02-19T03:24:10.445222+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/importlib/init.py”, line 126, in import_module
2021-02-19T03:24:10.445224+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-02-19T03:24:10.445224+00:00 app[web.1]: File “”, line 994, in _gcd_import
2021-02-19T03:24:10.445224+00:00 app[web.1]: File “”, line 971, in _find_and_load
2021-02-19T03:24:10.445225+00:00 app[web.1]: File “”, line 955, in _find_and_load_unlocked
2021-02-19T03:24:10.445225+00:00 app[web.1]: File “”, line 665, in _load_unlocked
2021-02-19T03:24:10.445226+00:00 app[web.1]: File “”, line 678, in exec_module
2021-02-19T03:24:10.445226+00:00 app[web.1]: File “”, line 219, in _call_with_frames_removed
2021-02-19T03:24:10.445226+00:00 app[web.1]: File “/app/app2.py”, line 5, in
2021-02-19T03:24:10.445227+00:00 app[web.1]: import plotly.express as px
2021-02-19T03:24:10.445227+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/plotly/express/init.py”, line 12, in
2021-02-19T03:24:10.445227+00:00 app[web.1]: Plotly express requires pandas to be installed."""
2021-02-19T03:24:10.445274+00:00 app[web.1]: ImportError: Plotly express requires pandas to be installed.
2021-02-19T03:24:10.445544+00:00 app[web.1]: [2021-02-19 03:24:10 +0000] [9] [INFO] Worker exiting (pid: 9)
2021-02-19T03:24:10.445940+00:00 app[web.1]: [2021-02-19 03:24:10 +0000] [10] [INFO] Worker exiting (pid: 10)
2021-02-19T03:24:10.599626+00:00 app[web.1]: Traceback (most recent call last):
2021-02-19T03:24:10.599676+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 209, in run
2021-02-19T03:24:10.600138+00:00 app[web.1]: self.sleep()
2021-02-19T03:24:10.600176+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 357, in sleep
2021-02-19T03:24:10.600531+00:00 app[web.1]: ready = select.select([self.PIPE[0]], , , 1.0)
2021-02-19T03:24:10.600568+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 242, in handle_chld
2021-02-19T03:24:10.600849+00:00 app[web.1]: self.reap_workers()
2021-02-19T03:24:10.600891+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 525, in reap_workers
2021-02-19T03:24:10.601307+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-02-19T03:24:10.601375+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer ‘Worker failed to boot.’ 3>
2021-02-19T03:24:10.601411+00:00 app[web.1]:
2021-02-19T03:24:10.601412+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2021-02-19T03:24:10.601412+00:00 app[web.1]:
2021-02-19T03:24:10.601445+00:00 app[web.1]: Traceback (most recent call last):
2021-02-19T03:24:10.601477+00:00 app[web.1]: File “/app/.heroku/python/bin/gunicorn”, line 8, in
2021-02-19T03:24:10.601663+00:00 app[web.1]: sys.exit(run())
2021-02-19T03:24:10.601696+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py”, line 58, in run
2021-02-19T03:24:10.601889+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2021-02-19T03:24:10.601923+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py”, line 228, in run
2021-02-19T03:24:10.602193+00:00 app[web.1]: super().run()
2021-02-19T03:24:10.602226+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py”, line 72, in run
2021-02-19T03:24:10.602421+00:00 app[web.1]: Arbiter(self).run()
2021-02-19T03:24:10.602454+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 229, in run
2021-02-19T03:24:10.602748+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2021-02-19T03:24:10.602754+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 342, in halt
2021-02-19T03:24:10.603089+00:00 app[web.1]: self.stop()
2021-02-19T03:24:10.603133+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 390, in stop
2021-02-19T03:24:10.603499+00:00 app[web.1]: self.kill_workers(sig)
2021-02-19T03:24:10.603503+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 626, in kill_workers
2021-02-19T03:24:10.603969+00:00 app[web.1]: self.kill_worker(pid, sig)
2021-02-19T03:24:10.603974+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 636, in kill_worker
2021-02-19T03:24:10.604438+00:00 app[web.1]: os.kill(pid, sig)
2021-02-19T03:24:10.604472+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 242, in handle_chld
2021-02-19T03:24:10.604740+00:00 app[web.1]: self.reap_workers()
2021-02-19T03:24:10.604773+00:00 app[web.1]: File “/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py”, line 525, in reap_workers
2021-02-19T03:24:10.605145+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-02-19T03:24:10.605180+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer ‘Worker failed to boot.’ 3>
2021-02-19T03:24:10.683527+00:00 heroku[web.1]: Process exited with status 1
2021-02-19T03:24:10.772430+00:00 heroku[web.1]: State changed from up to crashed
2021-02-19T03:24:16.130499+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/favicon.ico" host=dash-app2-example.herokuapp request_id=93b96341-6a7e-4fae-8cd0-1d6c21475082 fwd=“44.192.106.53” dyno=web.1 connect=2ms service= status=503 bytes= protocol=https
2021-02-19T03:32:59.000000+00:00 app[api]: Build started by user @gmail.com
2021-02-19T03:33:31.000000+00:00 app[api]: Build failed – check your build output: //dashboard…heroku/apps/cf293ff7-48ea-4a69-9ea5-f1139175d9d0/activity/builds/6304bd73-f811-428d-bab4-0fc76acb25e0
2021-02-19T03:38:18.000000+00:00 app[api]: Build started by user @gmail.com
2021-02-19T03:38:58.000000+00:00 app[api]: Build failed – check your build output: dashboard…heroku.com/apps/cf293ff7-48ea-4a69-9ea5-f1139175d9d0/activity/builds/29982769-10b3-45ed-a537-e5e384b58fee
2021-02-19T03:39:33.000000+00:00 app[api]: Build started by user @gmail.com
2021-02-19T03:40:08.000000+00:00 app[api]: Build failed – check your build output: dashboard…heroku.com/apps/cf293ff7-48ea-4a69-9ea5-f1139175d9d0/activity/builds/bf6a9ce4-475e-4aa8-adba-2c901015006b
2021-02-19T03:41:58.000000+00:00 app[api]: Build started by user @gmail.com
2021-02-19T03:43:50.124948+00:00 app[api]: Deploy f4d8c4c7 by user @gmail.com
2021-02-19T03:43:50.124948+00:00 app[api]: Release v4 created by user @gmail.com
2021-02-19T03:43:50.307746+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-19T03:44:08.440224+00:00 heroku[web.1]: Starting process with command gunicorn app2:server
2021-02-19T03:44:11.237649+00:00 app[web.1]: bash: gunicorn: command not found
2021-02-19T03:44:11.291497+00:00 heroku[web.1]: Process exited with status 127
2021-02-19T03:44:11.406755+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-19T03:44:11.410720+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-19T03:44:14.000000+00:00 app[api]: Build succeeded
2021-02-19T03:44:25.471022+00:00 heroku[web.1]: Starting process with command gunicorn app2:server
2021-02-19T03:44:27.540370+00:00 app[web.1]: bash: gunicorn: command not found
2021-02-19T03:44:27.584170+00:00 heroku[web.1]: Process exited with status 127
2021-02-19T03:44:27.669781+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-19T03:44:28.885145+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/" host=dash-app2-example.herokuapp.com request_id=05d36120-95a3-4004-9c5f-6b25cb1cb809 fwd=“44.192.106.53” dyno= connect= service= status=503 bytes= protocol=https
2021-02-19T03:44:29.035315+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/favicon.ico" host=dash-app2-example.herokuapp.com request_id=d2faf993-fd10-418f-bf6f-dc0334dc7129 fwd=“44.192.106.53” dyno= connect= service= status=503 bytes= protocol=https

(venv) C:\Users\16124\Desktop\dash_app_example\dash-app2-example>heroku run printenv
Running printenv on ⬢ dash-app2-example… up, run.8027 (Free)
PYTHONUNBUFFERED=true
PYTHONHASHSEED=random
PWD=/app
PORT=53715
GUNICORN_CMD_ARGS=–access-logfile -
LINES=67
DYNO_RAM=512
HOME=/app
LANG=en_US.UTF-8
COLUMNS=294
FORWARDED_ALLOW_IPS=*
PYTHONPATH=/app
PYTHONHOME=/app/.heroku/python
LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:
SHLVL=0
WEB_CONCURRENCY=2
LD_LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:
PS1=[\033[01;34m]\w[\033[00m] [\033[01;32m]$ [\033[00m]
PATH=/app/.heroku/python/bin:/usr/local/bin:/usr/bin:/bin
DYNO=run.8027
_=/usr/bin/printenv