# Exception for callback while creating figure

**URL:** <https://community.plotly.com/t/exception-for-callback-while-creating-figure/54473>\
**Category:** Dash Python\
**Created:** [July 6, 2021, 5:21am UTC](https://community.plotly.com/t/exception-for-callback-while-creating-figure/54473 "2021-07-06T05:21:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![cody](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cody](https://community.plotly.com/u/cody)\
**Post date:** [July 12, 2021, 10:26am UTC](https://community.plotly.com/t/exception-for-callback-while-creating-figure/54473/5 "2021-07-12T10:26:24Z")

</div>

Hi @BMWE

I just link this answer from another thread. It might be useful for you in the future. 🙂

The gist is: If you define your Output as a list, you should return back a list.

> [@Cannot get multiple inputs and multiple outputs to work](https://community.plotly.com/t/cannot-get-multiple-inputs-and-multiple-outputs-to-work/26945/2):
>
> Welcome @rbw - you’re super close! If you define the callback output as a list @app.callback([Output('kategorie-sls', 'figure')], ...) then the return value must also be a length-1 list like return [go.Figure(data=graph)] or return [{'data': graph}] But if you don’t wrap in a list @app.callback(Output('kategorie-sls', 'figure'), ...) you should also not wrap the return in a list return go.Figure(data=graph) or return {'data': graph}

---

_[View the full topic](https://community.plotly.com/t/exception-for-callback-while-creating-figure/54473)._
