We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe your context
dash 2.0.0 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0
Describe the bug
When a non json-serializable object is nested within a valid object, PlotlyJSONEncoder throws misleading exceptions.
Expected behavior PlotlyJSONEncoder should throw an exception stating that the offending object is non-serializable.
Reproducible example The following example reproduces two different misleading exceptions.
(NB: we allow Dash to call the callbacks and trigger the exceptions on initial render)
import dash from dash import html from dash.dependencies import Input, Output app = dash.Dash(__name__) app.layout = html.Div( [ html.Button("output to 1", id="buttonA"), html.Button("output to 2 and 3", id="buttonB"), html.Div(id="output1"), html.Div(id="output2"), html.Div(id="output3") ] ) @app.callback( [Output("output1", "children")], Input("buttonA", "n_clicks") ) def non_serializable_output_in_list(n_clicks): # nested not jsonifiable output inside a list out1 = { "nested_not_jsonifiable":{"a":1, "b":2}.values() } return [out1] @app.callback( [ Output("output2", "children"), Output("output3", "children") ], Input("buttonB", "n_clicks") ) def non_serializable_output_alongside_no_update(n_clicks): # nested non-jsonifiable object alongside a dash.no_update out2 = { "nested_not_jsonifiable":{"a":1, "b":2}.values() } out3 = dash.no_update return [out2, out3] if __name__ == '__main__': app.run_server(debug=True)
The text was updated successfully, but these errors were encountered:
@alexcjohnson as described in comment to #1014
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Describe your context
Describe the bug
When a non json-serializable object is nested within a valid object, PlotlyJSONEncoder throws misleading exceptions.
Expected behavior
PlotlyJSONEncoder should throw an exception stating that the offending object is non-serializable.
Reproducible example
The following example reproduces two different misleading exceptions.
(NB: we allow Dash to call the callbacks and trigger the exceptions on initial render)
The text was updated successfully, but these errors were encountered: