# Multipage app Broken!

**URL:** <https://community.plotly.com/t/multipage-app-broken/11828>\
**Category:** Dash Python\
**Created:** [July 17, 2018, 1:27pm UTC](https://community.plotly.com/t/multipage-app-broken/11828 "2018-07-17T13:27:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ola](https://avatars.discourse-cdn.com/v4/letter/o/dbc845/32.png) [@Ola](https://community.plotly.com/u/Ola)\
**Post date:** [July 17, 2018, 1:27pm UTC](https://community.plotly.com/t/multipage-app-broken/11828/1 "2018-07-17T13:27:54Z")

</div>

Hello Dash Community!  
So… i reinstalled all my dash libraries to add the following update to my app…

> [@Input two or more button - How to tell which button is pressed?](https://community.plotly.com/t/input-two-or-more-button-how-to-tell-which-button-is-pressed/5788/29):
>
> I’ve published the new versions now, here’s a quick example: # Determine which input changed, or which button was clicked, using # the latest functionality in dash-html-components (https://github.com/plotly/dash-html-components/pull/45) import dash from dash.dependencies import Input, Output import dash\_core\_components as dcc import dash\_html\_components as html import datetime import json app = dash.Dash() app.layout = html.Div([ html.Button('Button 1', id='btn-1', n\_clicks\_timestamp='0')…

but… everything just broke! even when i removed the buttons causing the trouble. I’m not getting any errors, nor and when i click on something , the console shows changes, but the app is completely unresponsive!

Any ideas on how to fix this? I anticipate that I somehow managed to install the libraries twice, or in such a way that breaks the app.

Thanks a ton!

---

<div class="post-metadata">

**Author:** ![shammamah](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@shammamah](https://community.plotly.com/u/shammamah)\
**Post date:** [July 17, 2018, 3:03pm UTC](https://community.plotly.com/t/multipage-app-broken/11828/2 "2018-07-17T15:03:35Z")

</div>

Hi! Could you possibly share some screenshots of what’s going on, or send the source code for your app?

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [July 17, 2018, 3:36pm UTC](https://community.plotly.com/t/multipage-app-broken/11828/3 "2018-07-17T15:36:59Z")

</div>

> [@Ola](#):
>
> So… i reinstalled all my dash libraries to add the following update to my app…

We made some changes recently to the `dcc.Link` component, see the CHANGELOG here: [dash-core-components/CHANGELOG.md at master · plotly/dash-core-components · GitHub](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#0241). Could you try installing the previous version, `2.4.0`, and seeing if that fixes it?

```auto
pip install dash-core-components==0.24.0

```

---

<div class="post-metadata">

**Author:** ![Ola](https://avatars.discourse-cdn.com/v4/letter/o/dbc845/32.png) [@Ola](https://community.plotly.com/u/Ola)\
**Post date:** [July 18, 2018, 9:43am UTC](https://community.plotly.com/t/multipage-app-broken/11828/4 "2018-07-18T09:43:34Z")

</div>

I have 2 versions of the app… one with a classical multi-page format, the other using the following.

> <https://github.com/plotly/dash-recipes/blob/master/dash-urls-hide-show-tabs.py>

The classical one works just fine (except for the callbacks in one of the pages for some reason) when i installed 0.24.0, but the one with the show/hide option is is not…

---

<div class="post-metadata">

**Author:** ![Ola](https://avatars.discourse-cdn.com/v4/letter/o/dbc845/32.png) [@Ola](https://community.plotly.com/u/Ola)\
**Post date:** [July 18, 2018, 9:48am UTC](https://community.plotly.com/t/multipage-app-broken/11828/5 "2018-07-18T09:48:27Z")

</div>

unfortunately, I have nothing to show! the callbacks are just not being called, and sometimes, the layout just doesnt load.

I’m not getting any error messages or any funny responses in the console.

---

<div class="post-metadata">

**Author:** ![valentijnnieman](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/valentijnnieman/32/3527_2.png) [@valentijnnieman](https://community.plotly.com/u/valentijnnieman)\
**Post date:** [July 18, 2018, 12:22pm UTC](https://community.plotly.com/t/multipage-app-broken/11828/6 "2018-07-18T12:22:52Z")

</div>

Hi Ola, sorry to hear your app is not working anymore! I’ve tried to run the example you gave us above in 0.24.1, and it works fine for me on Chrome & Firefox. What browser are you using? Could you make sure your app is running correctly, i.e. that the server is on?

---

<div class="post-metadata">

**Author:** ![Ola](https://avatars.discourse-cdn.com/v4/letter/o/dbc845/32.png) [@Ola](https://community.plotly.com/u/Ola)\
**Post date:** [July 18, 2018, 1:16pm UTC](https://community.plotly.com/t/multipage-app-broken/11828/7 "2018-07-18T13:16:17Z")

</div>

I have the callbacks in separate files, could that be causing the issue (though it worked before)?

The server is up and running too…  
Thanks for the response! I’ll keep you posted if i come up with any ideas 🙂

---

<div class="post-metadata">

**Author:** ![Ola](https://avatars.discourse-cdn.com/v4/letter/o/dbc845/32.png) [@Ola](https://community.plotly.com/u/Ola)\
**Post date:** [July 24, 2018, 9:33am UTC](https://community.plotly.com/t/multipage-app-broken/11828/9 "2018-07-24T09:33:47Z")

</div>

Soo… here’s the issue:  
I have a graph that takes data from my table, plays around with it a bit then displays, but sometimes this table is empty…

- If i don’t address that, whenever the table is empty i get a `KeyError`, because none of the headers i have defined are there…
- If i do this, the app breaks whenever the table is empty:  
`def update_figure(data, value):`  
`try:`  
`#lots of code`  
`return figure`  
`except KeyError:`  
`pass`
- Same happens if i do this:  
`def update_figure(data, value):`  
`if len(data!=0) :`  
`#lots of code`  
`figure = ...`  
`else:`  
`figure = {}`  
`return figure`

Is there any other way around this?
