Good day guys
Wanted to inquire something on the live update on https://plot.ly/dash/live-updates. I tried running it but am getting an error as seen on the attached pic. I havent modified it before but was trying to understand how the live update works. Am not sure if its my machine or something. Can you assist.
It looks like a mistake in the dash docs. That should be n_intervals
rather than n_interval
.
Edit: @chriddyp, just created a PR: https://github.com/plotly/dash-docs/pull/62
@nedned is changing from ‘n_interval’ to ‘n_intervals’ right. I am getting the same error for ‘n_intervals’. I followed the change you made over github, can you be able to check if its running your side
Try updating all the various Dash packages (but probably mainly the core components). I noticed that your original snippet had a slightly different error message to mine when I ran it, so possibly a discrepancy in our environments.
Thanks. Whilst on this subject of update functions, is it possible for dash to update data on a interval basis. Suppose you have a app thats supposed to pick data from a folder, this folder is updated on the hourly basis, without refreshing the page is it possible for dash to change the plot and Div contents to show the changes made to the datasets
Yep, just open the file within the callback that is run on an interval,
then each time it runs it will get the current version of the file.
I know this is not allowed, but just tested it and it works, meaning plots can be dynamic by using interval. I am loving Dash
I’m not sure what you mean by that not being allowed. Doing this does does not modify any global state, which would be the main thing that you need to avoid when writing callbacks.