NeurodataWithoutBorders / nwbinspector

Tool to help inspect NWB files for compliance with NWB Best Practices
https://nwbinspector.readthedocs.io/
Other
17 stars 10 forks source link

[Bug]: check_data_orientation key-error for data #199

Closed CodyCBakerPhD closed 2 years ago

CodyCBakerPhD commented 2 years ago

What happened?

One of several occurrences of issues when scanning dandiset 000065

000065.txt

Steps to Reproduce

No response

Traceback

0.0.0  sub-Kibbles/sub-Kibbles_behavior+ecephys.nwb and 2 other files: 'None' object with name 'None'
         Message: Traceback (most recent call last):
  File "/home/jovyan/GitHub/nwbinspector/nwbinspector/nwbinspector.py", line 503, in run_checks
    output = check_function(nwbfile_object)
  File "/home/jovyan/GitHub/nwbinspector/nwbinspector/register_checks.py", line 127, in auto_parse_some_output
    output = check_function(*args, **kwargs)
  File "/home/jovyan/GitHub/nwbinspector/nwbinspector/checks/time_series.py", line 37, in check_data_orientation
    if time_series.data is not None and any(np.array(time_series.data.shape[1:]) > time_series.data.shape[0]):
  File "/home/jovyan/my-conda-envs/nwbinspector/lib/python3.10/site-packages/pynwb/base.py", line 233, in data
    if isinstance(self.fields['data'], TimeSeries):
KeyError: 'data'

Operating System

Linux

Python Executable

Python

Python Version

3.9

Usage

Library (Python code)

Were you streaming with ROS3?

Yes

Package Versions

No response

Code of Conduct

CodyCBakerPhD commented 2 years ago

Considering this a part of #198