Ah, that’s helpful. I’m going to guess it’s some interaction between dash
and jupyter
/ipython
, but I don’t have much experience. I just tried to replicate like so:
- run
jupyter lab
from command line - paste in your
dash_dropdown.py
code from above - click run button
* Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)
* Restarting with stat
An exception has occurred, use %tb to see the full traceback.
SystemExit: 1
~/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2918: UserWarning:
To exit: use 'exit', 'quit', or Ctrl-D.
So I’m not even able to replicate at the moment. If this is an issue with dash
and jupyter
interaction, I found some posts that might be helpful (also indicates special things are required, which makes me think this is, indeed, why you’re having troubles):
Wow! So, that last link is a github issue and I just tried @chriddyp’s suggestion to just run with debug=False
and it seems to work! Check it out. I’ve got two dash
apps pasted, and the play/stop buttons work as expected, provided I reload after starting the second. The sequence is play, show it’s working, go back and stop, refresh to show it’s dead, start the second, reload to show it’s changed.