Black Lives Matter. Please consider donating to Black Girls Code today.

Multipage app trouble after updating dash components

Hi! i’m using gunicorn to serve multi page app. After updating all dash packages i faced that error:

Traceback (most recent call last):
File “/home/roman/analitic_app/lib/python3.5/site-packages/flask/”, line 1982, in wsgi_app
response = self.full_dispatch_request()
File “/home/roman/analitic_app/lib/python3.5/site-packages/flask/”, line 1607, in full_dispatch_request
File “/home/roman/analitic_app/lib/python3.5/site-packages/flask/”, line 1654, in try_trigger_before_first_request_functions
File “/home/roman/analitic_app/lib/python3.5/site-packages/dash/”, line 544, in _setup_server
File “/home/roman/analitic_app/lib/python3.5/site-packages/dash/”, line 234, in _generate_scripts_html
self.scripts.get_all_scripts() +
File “/home/roman/analitic_app/lib/python3.5/site-packages/dash/”, line 123, in get_all_scripts
return self._resources.get_all_resources()
File “/home/roman/analitic_app/lib/python3.5/site-packages/dash/”, line 56, in get_all_resources
self.get_inferred_resources() + self._resources
File “/home/roman/analitic_app/lib/python3.5/site-packages/dash/”, line 84, in get_inferred_resources
for t in layout.traverse():
AttributeError: ‘NoneType’ object has no attribute ‘traverse’

and in browser

have no idea why app stoped working. i have read dash’s update notes on github and remove secret key from but it didnt help. am i the only one facing that trouble?

Hey @roman - I’m not sure what’s going on here, but this error message has to do with app.layout. For some reason, the app thinks that it is None.

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

Yes. That was my fail =) I forgot correct command to run app with gunicorn. In two words i typed gunicorn -b -w 4 index:app instead gunicorn -b -w 4 index:app.server

THANK YOU! Just have to say I was going crazy with this same issue. Simply changing app:server to index:app.server in the Procfile fixed this.