You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
I am using jupyter dash to make a dash project on a jupyter notebook. Every time I update my code, I have to kill the kernel and then restart the jupyter notebook to get the changed code to work properly. Otherwise, the dash page will show a double loading error. I would like to know if there is a way to refresh the jupyter dash server without restarting the kernel.
The text was updated successfully, but these errors were encountered:
Here is an unofficial workaround that seems to work for refreshing callback cells without restarting the kernel:
Close any running Jupyter Notebook or JupyterLab instances
Make a backup of the file ~/anaconda3/lib/python3.9/site-packages/jupyter_dash/jupyter_app.py (note: the path may differ depending on your system type and installation location of jupyter-dash)
Open the original jupyter_app.py in a text editor
Change the line: kwargs['dev_tools_hot_reload'] = mode == "external" to be kwargs['dev_tools_hot_reload'] = True and then save and close the file
Reopen Jupyter Notebook or JupyterLab as usual
This uses the hot reload capability of Dash to allow you to edit and run Jupyter cells and then see the changes for any newly-drawn callbacks. Any HTML that is already rendered won't change, however. Perhaps the dash or jupyter-dash authors know of a way to safely refresh all rendered objects?
Also, note that jupyter_app.py mentions that enabling the code change above can sometimes cause Jupyter problems when there is no active kernel. I haven't encountered this issue yet.
I am using jupyter dash to make a dash project on a jupyter notebook. Every time I update my code, I have to kill the kernel and then restart the jupyter notebook to get the changed code to work properly. Otherwise, the dash page will show a double loading error. I would like to know if there is a way to refresh the jupyter dash server without restarting the kernel.
The text was updated successfully, but these errors were encountered: