Reputation: 766
As announced here, Dash's hot reload is supposed to be automatically activated when debug=True
. However, that is not working for me. I even tried explicitly setting dev_tools_hot_reload=True
.
I save the code file from the IDE but I see no changes on the web interface thereafter.
Even reloading the page makes no difference. I have to stop the server and re-run the script.
What can be the issue?
Edit
I am working with VSCode & running the script from the windows powershell (outside the VSCode terminal).
Installing a new version from conda-forge didn't work.
Upvotes: 8
Views: 9766
Reputation: 604
I personally could not find a satisfactory answers on either Dash docs or Dash forum. It seems like in every post you are given different instructions on how to implement hot-reloading with the refrain "it's built in and should just work." So here is anecdotical solution how it worked for me:
file.py:
app = dash.Dash(__name__)
# Dash code
if __name__ == '__main__':
app.run_server(debug=True, threaded=True)
If everything is working, then the tab name should change to:
And the page would auto-reload within about 2 seconds after hitting ⌘ + S
pip freeze
Upvotes: 4