Closed creuzige closed 2 years ago
The issue was that we need to return the right number of empty objects at the start of the app; if we add an extra figure/table, we have to be sure to tell the code to return an empty figure table --
This is the change that we need to make
# return nothing when app opens
if n_clicks == 0:
return go.Figure(), go.Figure(), [], [], go.Figure(), go.Figure(), [], [] # <-- added in the last 3 empty objects
It looks like I may have screwed something up when I added some additional plots and tables. I get the following error messages in docker. The code still seems to run ok though...
`[2021-12-29 18:23:01 +0000] [10] [INFO] Booting worker with pid: 10
GSAS-II binary directory: /root/g2full/GSASII/bindist
Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File "/root/g2full/lib/python3.7/site-packages/flask/app.py", line 2073, in wsgi_app
File "/root/g2full/lib/python3.7/site-packages/flask/app.py", line 1518, in full_dispatch_request
File "/root/g2full/lib/python3.7/site-packages/flask/app.py", line 1516, in full_dispatch_request
File "/root/g2full/lib/python3.7/site-packages/flask/app.py", line 1502, in dispatch_request
File "/root/g2full/lib/python3.7/site-packages/dash/dash.py", line 1336, in dispatch
File "/root/g2full/lib/python3.7/site-packages/dash/_callback.py", line 166, in add_context
File "/root/g2full/lib/python3.7/site-packages/dash/_grouping.py", line 34, in flatten_grouping
File "/root/g2full/lib/python3.7/site-packages/dash/_grouping.py", line 214, in validate_grouping
File "/root/g2full/lib/python3.7/site-packages/dash/_grouping.py", line 183, in check
dash._grouping.SchemaLengthValidationError: Schema: [<Output
intensity-plot.figure
>, <Outputfitted-intensity-plot.figure
>, <Outputintensity-table.data
>, <Outputintensity-table.columns
>, <Outputnormalized-intensity-plot.figure
>, <Outputtwo_theta-plot.figure
>, <Outputphase-frac-table.data
>, <Outputphase-frac-table.columns
>]}), Figure({
}), [], [], Figure({
})]`