This is the entire callback:
app.clientside_callback(
"""
function (n_intervals, data, offset, first_value) {
if (data.x[0] === first_value) {
value_first = first_value;
} else {
value_first = data.x[0];
offset = 0;
};
offset = offset % data.x.length;
const end = Math.min((offset + 1), data.x.length);
return [[{x: [data.x.slice(offset, end), data.x.slice(offset, end)], y: [data.y.slice(offset, end), data.yb.slice(offset, end)]}, [0, 1], 250], end, data.x[offset], value_first];
}
""",
[
Output("graph", "extendData"),
Output("offset", "data"),
Output("time-offset", "data"),
Output("first-value", "data"),
],
[Input("interval", "n_intervals")],
[State("store", "data"), State("offset", "data"), State("first-value", "data")],
)
There is nothing in my terminal but there is in the chrome console (they seem to repeat infintely):
Error: indices must be valid indices for gd.data.
at P (async-plotlyjs.js:2)
at async-plotlyjs.js:2
at O (async-plotlyjs.js:2)
at Object.t [as extendTraces] (async-plotlyjs.js:2)
at Graph.react.js:223
at Array.forEach (<anonymous>)
at u.value (Graph.react.js:203)
at u.value (Graph.react.js:435)
at callComponentWillReceiveProps (react-dom@16.v2_0_0m1635790425.14.0.js:13111)
at updateClassInstance (react-dom@16.v2_0_0m1635790425.14.0.js:13313)
error @ error.js:38
combination @ redux.js:538
eval @ reducer.js:126
eval @ reducer.js:172
dispatch @ redux.js:298
eval @ index.js:12
componentDidCatch @ ComponentErrorBoundary.react.js:56
callback @ react-dom@16.v2_0_0m1635790425.14.0.js:20884
callCallback @ react-dom@16.v2_0_0m1635790425.14.0.js:12625
commitUpdateQueue @ react-dom@16.v2_0_0m1635790425.14.0.js:12646
commitLifeCycles @ react-dom@16.v2_0_0m1635790425.14.0.js:19993
commitLayoutEffects @ react-dom@16.v2_0_0m1635790425.14.0.js:22938
callCallback @ react-dom@16.v2_0_0m1635790425.14.0.js:182
invokeGuardedCallbackDev @ react-dom@16.v2_0_0m1635790425.14.0.js:231
invokeGuardedCallback @ react-dom@16.v2_0_0m1635790425.14.0.js:286
commitRootImpl @ react-dom@16.v2_0_0m1635790425.14.0.js:22676
unstable_runWithPriority @ react@16.v2_0_0m1635790425.14.0.js:2685
runWithPriority$1 @ react-dom@16.v2_0_0m1635790425.14.0.js:11174
commitRoot @ react-dom@16.v2_0_0m1635790425.14.0.js:22516
finishSyncRender @ react-dom@16.v2_0_0m1635790425.14.0.js:21942
performSyncWorkOnRoot @ react-dom@16.v2_0_0m1635790425.14.0.js:21928
(anonymous) @ react-dom@16.v2_0_0m1635790425.14.0.js:11224
unstable_runWithPriority @ react@16.v2_0_0m1635790425.14.0.js:2685
runWithPriority$1 @ react-dom@16.v2_0_0m1635790425.14.0.js:11174
flushSyncCallbackQueueImpl @ react-dom@16.v2_0_0m1635790425.14.0.js:11219
workLoop @ react@16.v2_0_0m1635790425.14.0.js:2629
flushWork @ react@16.v2_0_0m1635790425.14.0.js:2584
performWorkUntilDeadline @ react@16.v2_0_0m1635790425.14.0.js:2196
async-plotlyjs.js:2 Uncaught Error: indices must be valid indices for gd.data.
at P (async-plotlyjs.js:2)
at async-plotlyjs.js:2
at O (async-plotlyjs.js:2)
at Object.t [as extendTraces] (async-plotlyjs.js:2)
at Graph.react.js:223
at Array.forEach (<anonymous>)
at u.value (Graph.react.js:203)
at u.value (Graph.react.js:435)
at callComponentWillReceiveProps (react-dom@16.v2_0_0m1635790425.14.0.js:13111)
at updateClassInstance (react-dom@16.v2_0_0m1635790425.14.0.js:13313)
P @ async-plotlyjs.js:2
(anonymous) @ async-plotlyjs.js:2
O @ async-plotlyjs.js:2
t @ async-plotlyjs.js:2
(anonymous) @ Graph.react.js:223
value @ Graph.react.js:203
value @ Graph.react.js:435
callComponentWillReceiveProps @ react-dom@16.v2_0_0m1635790425.14.0.js:13111
updateClassInstance @ react-dom@16.v2_0_0m1635790425.14.0.js:13313
updateClassComponent @ react-dom@16.v2_0_0m1635790425.14.0.js:17242
beginWork @ react-dom@16.v2_0_0m1635790425.14.0.js:18755
callCallback @ react-dom@16.v2_0_0m1635790425.14.0.js:182
invokeGuardedCallbackDev @ react-dom@16.v2_0_0m1635790425.14.0.js:231
invokeGuardedCallback @ react-dom@16.v2_0_0m1635790425.14.0.js:286
beginWork$1 @ react-dom@16.v2_0_0m1635790425.14.0.js:23338
performUnitOfWork @ react-dom@16.v2_0_0m1635790425.14.0.js:22292
workLoopSync @ react-dom@16.v2_0_0m1635790425.14.0.js:22265
performSyncWorkOnRoot @ react-dom@16.v2_0_0m1635790425.14.0.js:21891
(anonymous) @ react-dom@16.v2_0_0m1635790425.14.0.js:11224
unstable_runWithPriority @ react@16.v2_0_0m1635790425.14.0.js:2685
runWithPriority$1 @ react-dom@16.v2_0_0m1635790425.14.0.js:11174
flushSyncCallbackQueueImpl @ react-dom@16.v2_0_0m1635790425.14.0.js:11219
workLoop @ react@16.v2_0_0m1635790425.14.0.js:2629
flushWork @ react@16.v2_0_0m1635790425.14.0.js:2584
performWorkUntilDeadline @ react@16.v2_0_0m1635790425.14.0.js:2196
react-dom@16.v2_0_0m1635790425.14.0.js:19662 The above error occurred in the <u> component:
in u
in Suspense
in Unknown (created by s)
in s (created by CheckedComponent)
in CheckedComponent (created by BaseTreeContainer)
in ComponentErrorBoundary (created by BaseTreeContainer)
in BaseTreeContainer (created by Context.Consumer)
in Unknown (created by BaseTreeContainer)
in div (created by it)
in it (created by CheckedComponent)
in CheckedComponent (created by BaseTreeContainer)
in ComponentErrorBoundary (created by BaseTreeContainer)
in BaseTreeContainer (created by Context.Consumer)
in Unknown (created by UnconnectedContainer)
in div (created by UnconnectedGlobalErrorContainer)
in div (created by GlobalErrorOverlay)
in div (created by GlobalErrorOverlay)
in GlobalErrorOverlay (created by DebugMenu)
in div (created by DebugMenu)
in DebugMenu (created by UnconnectedGlobalErrorContainer)
in div (created by UnconnectedGlobalErrorContainer)
in UnconnectedGlobalErrorContainer (created by withRadiumContexts(UnconnectedGlobalErrorContainer))
in withRadiumContexts(UnconnectedGlobalErrorContainer) (created by Connect(withRadiumContexts(UnconnectedGlobalErrorContainer)))
in Connect(withRadiumContexts(UnconnectedGlobalErrorContainer)) (created by UnconnectedContainer)
in UnconnectedContainer (created by Connect(UnconnectedContainer))
in Connect(UnconnectedContainer) (created by UnconnectedAppContainer)
in UnconnectedAppContainer (created by Connect(UnconnectedAppContainer))
in Connect(UnconnectedAppContainer) (created by AppProvider)
in Provider (created by AppProvider)
in AppProvider
React will try to recreate this component tree from scratch using the error boundary you provided, ComponentErrorBoundary.