Dash app errors in deployment to Heroku

This App runs well locally, but It’s hard to point where the problem is during deployment. I would really appreciate some help.

Instantiating app and wrapping it with WhiteNoise to serve static pages:

app = dash.Dash(__name__, external_stylesheets=['static/bootstrap.min.css'], title='Possibility Dash Apps Analytics',

                update_title='Loading...',

                meta_tags=[{'name': 'viewport', 'content': 'width=device-width, initial-scale=1.0'},

                           {'name': 'Dash Analytics Application',

                            'content': 'Best library for making analytics/AI/ML apps in python'},

                           {'http-equiv': 'X-UA-Compatible', 'content': 'IE=edge'}])

server = app.server

server.wsgi_app = WhiteNoise(server.wsgi_app, root='static/')

auth = dash_auth.BasicAuth(

    app,

    auth.approve()

)

Running the application

if __name__ == '__main__':

    app.run_server(debug=True)

Procfile

web: gunicorn app:server

My Directory

Directory

The error generated due to deployment:

Hi @Pyboy7!

I guess auth.approve() is a function from auth.py, right? It looks a bit confusing without the imports.

Does it run locally with debug=False? Besides, is there anything more informative in the Heroku build log?

Thank you for the reply. I solved this issue then by using Urls of the desired images instead of static images which dash was not serving on Heroku even after using WhiteNoise module.

I do not know if there is another way around this.