Heroku deployment problem

Hi,
I’m attempting to deploy a dash app to heroku but keep receiving a 500 error. The logs show

2017-09-26T23:25:36.289070+00:00 app[web.1]: Traceback (most recent call last):
2017-09-26T23:25:36.289071+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/flask/app.py”, line 1982, in wsgi_app
2017-09-26T23:25:36.289072+00:00 app[web.1]: response = self.full_dispatch_request()
2017-09-26T23:25:36.289073+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/flask/app.py”, line 1607, in full_dispatch_request
2017-09-26T23:25:36.289074+00:00 app[web.1]: self.try_trigger_before_first_request_functions()
2017-09-26T23:25:36.289074+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/flask/app.py”, line 1654, in try_trigger_before_first_request_functions
2017-09-26T23:25:36.289076+00:00 app[web.1]: func()
2017-09-26T23:25:36.289076+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/dash/dash.py”, line 554, in _setup_server
2017-09-26T23:25:36.289077+00:00 app[web.1]: self._generate_scripts_html()
2017-09-26T23:25:36.289077+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/dash/dash.py”, line 244, in _generate_scripts_html
2017-09-26T23:25:36.289078+00:00 app[web.1]: self.scripts.get_all_scripts() +
2017-09-26T23:25:36.289079+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/dash/resources.py”, line 123, in get_all_scripts
2017-09-26T23:25:36.289080+00:00 app[web.1]: return self._resources.get_all_resources()
2017-09-26T23:25:36.289080+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/dash/resources.py”, line 56, in get_all_resources
2017-09-26T23:25:36.289081+00:00 app[web.1]: self.get_inferred_resources() + self._resources
2017-09-26T23:25:36.289082+00:00 app[web.1]: File “/app/.heroku/python/lib/python2.7/site-packages/dash/resources.py”, line 84, in get_inferred_resources
2017-09-26T23:25:36.289082+00:00 app[web.1]: for t in layout.traverse():
2017-09-26T23:25:36.289083+00:00 app[web.1]: AttributeError: ‘NoneType’ object has no attribute ‘traverse’

From what digging around I’ve been able to do it seems that this might be because the app --or at least app.layout – isn’t being found, but I’m unsure as to how to go about fixing this. It works like a charm when run locally.

Thanks

Hey @bfent did you find a solution? I’m having the same problem…