收到错误消息:"r is null" 每当 运行 一个 Dash 应用程序
Getting the error message: "r is null" whenever running a Dash application
我找不到任何类似的问题。自从我开始开发 Dash 应用程序后就出现了这个错误。
错误堆栈很长。我不确定它是否提供了信息,但我将其添加以防万一。
(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)
value@http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-graph.js:1:7832
value@http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-graph.js:1:12619
callComponentWillReceiveProps@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:13111:16
updateClassInstance@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:13313:38
updateClassComponent@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:17242:22
beginWork@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:18755:18
callCallback@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:182:16
invokeGuardedCallbackDev@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:231:18
invokeGuardedCallback@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:286:33
beginWork@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:23338:30
performUnitOfWork@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:22292:14
workLoopSync@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:22265:24
performSyncWorkOnRoot@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:21891:11
flushSyncCallbackQueueImpl/<@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11224:26
unstable_runWithPriority@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react@16.v2_0_0m1637923178.14.0.js:2685:14
runWithPriority@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11174:12
flushSyncCallbackQueueImpl@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11219:26
flushSyncCallbackQueue@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11207:5
batchedUpdates@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:21997:9
notify@webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:24:12
notifyNestedSubs@webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:95:20
handleChangeWrapper@webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:100:12
dispatch@webpack://dash_renderer/./node_modules/redux/es/redux.js?:307:7
createThunkMiddleware/</</<@webpack://dash_renderer/./node_modules/redux-thunk/es/index.js?:12:16
applyProps@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:74:15
observer/</<@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:115:40
forEach@webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<@webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2@webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
observer/<@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:102:55
forEach@webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<@webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2@webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
observer@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:84:51
StoreObserver/</<@webpack://dash_renderer/./src/StoreObserver.ts?:100:9
forEach@webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<@webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2@webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
StoreObserver/<@webpack://dash_renderer/./src/StoreObserver.ts?:98:51
dispatch@webpack://dash_renderer/./node_modules/redux/es/redux.js?:307:7
createThunkMiddleware/</</<@webpack://dash_renderer/./node_modules/redux-thunk/es/index.js?:12:16
_callee$@webpack://dash_renderer/./src/observers/executingCallbacks.ts?:78:25
c@http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4600
l/s._invoke</<@http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4354
y/</<@http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4963
asyncGeneratorStep@webpack://dash_renderer/./src/observers/executingCallbacks.ts?:13:103
_next@webpack://dash_renderer/./src/observers/executingCallbacks.ts?:15:212
很高兴收到您的意见和想法。
谢谢。
这个错误好像是在Dash应用开发之初出现的。调用回调函数后,错误不再弹出。
首先要检查的是 PreventUpdate
正在回调中用于处理空条件:
def some_callback(some_input):
if (some_input is None):
raise PreventUpdate
当我的 server-side 代码中出现错误导致 Dash 无法显示任何内容时,我也会出现 r is null
错误。
例如,当没有符合 user-specified 条件的跟踪时,我的 server-side 代码会抛出错误。在下面的屏幕截图中,您可以看到我为 y-axis 设置了 0.98
的阈值,并且没有痕迹满足该条件。这会触发错误,这意味着没有可供 Dash 显示的组件。
我找不到任何类似的问题。自从我开始开发 Dash 应用程序后就出现了这个错误。
错误堆栈很长。我不确定它是否提供了信息,但我将其添加以防万一。
(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)
value@http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-graph.js:1:7832
value@http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-graph.js:1:12619
callComponentWillReceiveProps@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:13111:16
updateClassInstance@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:13313:38
updateClassComponent@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:17242:22
beginWork@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:18755:18
callCallback@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:182:16
invokeGuardedCallbackDev@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:231:18
invokeGuardedCallback@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:286:33
beginWork@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:23338:30
performUnitOfWork@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:22292:14
workLoopSync@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:22265:24
performSyncWorkOnRoot@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:21891:11
flushSyncCallbackQueueImpl/<@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11224:26
unstable_runWithPriority@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react@16.v2_0_0m1637923178.14.0.js:2685:14
runWithPriority@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11174:12
flushSyncCallbackQueueImpl@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11219:26
flushSyncCallbackQueue@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:11207:5
batchedUpdates@http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom@16.v2_0_0m1637923178.14.0.js:21997:9
notify@webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:24:12
notifyNestedSubs@webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:95:20
handleChangeWrapper@webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:100:12
dispatch@webpack://dash_renderer/./node_modules/redux/es/redux.js?:307:7
createThunkMiddleware/</</<@webpack://dash_renderer/./node_modules/redux-thunk/es/index.js?:12:16
applyProps@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:74:15
observer/</<@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:115:40
forEach@webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<@webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2@webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
observer/<@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:102:55
forEach@webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<@webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2@webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
observer@webpack://dash_renderer/./src/observers/executedCallbacks.ts?:84:51
StoreObserver/</<@webpack://dash_renderer/./src/StoreObserver.ts?:100:9
forEach@webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<@webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2@webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
StoreObserver/<@webpack://dash_renderer/./src/StoreObserver.ts?:98:51
dispatch@webpack://dash_renderer/./node_modules/redux/es/redux.js?:307:7
createThunkMiddleware/</</<@webpack://dash_renderer/./node_modules/redux-thunk/es/index.js?:12:16
_callee$@webpack://dash_renderer/./src/observers/executingCallbacks.ts?:78:25
c@http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4600
l/s._invoke</<@http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4354
y/</<@http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4963
asyncGeneratorStep@webpack://dash_renderer/./src/observers/executingCallbacks.ts?:13:103
_next@webpack://dash_renderer/./src/observers/executingCallbacks.ts?:15:212
很高兴收到您的意见和想法。
谢谢。
这个错误好像是在Dash应用开发之初出现的。调用回调函数后,错误不再弹出。
首先要检查的是 PreventUpdate
正在回调中用于处理空条件:
def some_callback(some_input):
if (some_input is None):
raise PreventUpdate
当我的 server-side 代码中出现错误导致 Dash 无法显示任何内容时,我也会出现 r is null
错误。
例如,当没有符合 user-specified 条件的跟踪时,我的 server-side 代码会抛出错误。在下面的屏幕截图中,您可以看到我为 y-axis 设置了 0.98
的阈值,并且没有痕迹满足该条件。这会触发错误,这意味着没有可供 Dash 显示的组件。