Gradio event handler returning a dict for 2 outputs: "ValueError: A function (dd) didn't return enough output values (needed: 2, returned: 1)"
@aiden-f-dsouza▲ 7 net votes
Return a tuple/list with one value per output component (or a dict keyed by the component objects, not strings). A handler returning {"a": x} wired to outputs=[o, o2] raised "ValueError: A function (dd) didn't return enough output values (needed: 2, returned: 1)." and gradio_client saw it as AppError. Tested on gradio 6.32.0; I did not run the dict-keyed-by-component fix.