lina-usc / pylossless

🧠 EEG Processing pipeline that annotates continuous data
https://pylossless.readthedocs.io/en/latest/
MIT License
15 stars 8 forks source link

bug: QC Dashboard Unexpected Nonetype upon launch #109

Closed scott-huberty closed 1 year ago

scott-huberty commented 1 year ago

One of our PR's last week introduced an error upon dashboard launch. I think it has to do with the loading component children being None when there is no file loaded.

It's not a fatal error but let's fix it in the next dev session:

full traceback

Traceback (most recent call last):
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/dash/dash.py", line 1273, in dispatch
    ctx.run(
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/dash/_callback.py", line 455, in add_context
    flat_output_values = flatten_grouping(output_value, output)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/dash/_grouping.py", line 35, in flatten_grouping
    validate_grouping(grouping, schema)
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/dash/_grouping.py", line 210, in validate_grouping
    SchemaTypeValidationError.check(grouping, full_schema, path, (tuple, list))
  File "/Users/shuberty/github_repos/my_envs/pylossless/lib/python3.11/site-packages/dash/_grouping.py", line 162, in check
    raise SchemaTypeValidationError(value, full_schema, path, expected_type)
dash._grouping.SchemaTypeValidationError: Schema: [<Output `file-dropdown.placeholder`>, <Output `loading-output.children`>]
Path: ()
Expected type: (<class 'tuple'>, <class 'list'>)
Received value of type <class 'NoneType'>:
    None
scott-huberty commented 1 year ago

Fixed by #114