dash-extensions icon indicating copy to clipboard operation
dash-extensions copied to clipboard

NoOutputTransform Error when Layout is a Function

Open alexwilson1 opened this issue 4 years ago • 1 comments

With code similar to the below where layout is a function (needed to generate a unique UUID for each user), dash throws the error given:

from dash_extensions.enrich import DashProxy, NoOutputTransform

app = DashProxy(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP], transforms=[
    NoOutputTransform() # enable callbacks without output
])

def layout_fn_wrapper():
    return layout_fn(INPUT_VAR)


app.layout = layout_fn_wrapper

register_callbacks(app)

app.run_server(debug=True)
Attempting to connect a callback Output item to component:
  "b629a239-eae1-4459-b7d6-c72d9cc2048d"
but no components with that id exist in the layout.

If you are assigning callbacks to components that are
generated by other callbacks (and therefore not in the
initial layout), you can suppress this exception by setting
`suppress_callback_exceptions=True`.
This ID was used in the callback(s) for Output(s):
  b629a239-eae1-4459-b7d6-c72d9cc2048d.children
```Attempting to connect a callback Output item to component:
  "b629a239-eae1-4459-b7d6-c72d9cc2048d"
but no components with that id exist in the layout.

If you are assigning callbacks to components that are
generated by other callbacks (and therefore not in the
initial layout), you can suppress this exception by setting
`suppress_callback_exceptions=True`.
This ID was used in the callback(s) for Output(s):
  b629a239-eae1-4459-b7d6-c72d9cc2048d.children

alexwilson1 avatar Aug 13 '21 21:08 alexwilson1

Could you provide a complete MWE, i.e. a piece of code that runs independently and demonstrates the issue?

emilhe avatar May 02 '22 19:05 emilhe