I keep getting A nonexistent object was used in an Output of a Dash callback.
All the objects do exists in the layout on a different page. I am looking at Dynamically Create a Layout for Multi-Page App Validation but all of my page layouts are defined as functions in the page.py file. It seems like some layouts do get validated and others do not, and it is different every time I refresh the home page.
Is there an easy way to validate my layout and silence this error or can I prevent the error.js function from logging the error in the console?
case 'ON_ERROR': {
const {frontEnd, backEnd, backEndConnected} = state;
// log errors to the console for stack tracing and so they're
// available even with debugging off
/* eslint-disable-next-line no-console */
console.error(action.payload.error);
I am using DashProxy with dash_extensions.pages.setup_page_components
app = DashProxy(__name__, external_stylesheets=external_stylesheets,
title='Dashboard', use_pages=True, suppress_callback_exceptions=True,
transforms=[ServersideOutputTransform()], external_scripts=external_js)
But suppress_callback_exceptions
does not get added to app.config
when I print it. I then did:
app = DashProxy(__name__, external_stylesheets=external_stylesheets,
title='Dashboard', use_pages=True, suppress_callback_exceptions=True,
transforms=[ServersideOutputTransform()], external_scripts=external_js)
app.config.suppress_callback_exceptions = True
This added it to the config but I get the same nonexistent object error. I also tried adding flask.has_request_context
inside a layout function but that did not work either.
My project structure is
- app.py
- pages
| -- folder1
| -- page1.py
| -- page2.py
| -- folder1_components.py
| -- folder2
| -- page3.py
| -- page4.py
| -- folder2_components.py
| -- folder3
...