[Bug] NWBHDF5IO.can_read()
fails for missing version
#1919
Labels
category: bug
errors in the code or code behavior
priority: medium
non-critical problem and/or affecting only a small set of NWB users
Milestone
As in the title, the problem is the following,
NWBHDF5IO.can_read()
relies onget_nwbfile_version
and critically it indexes the output:pynwb/src/pynwb/__init__.py
Line 272 in 90e6048
However,
get_nwbfile_version
can also return None and then the indexing fails:pynwb/src/pynwb/__init__.py
Line 183 in 90e6048
It seems to me that the solution should be that if
get_nwbfile_version
returns None thenNWBHDF5IO.can_read()
should return None instead of trying to index.From the discussion in neuroconv:
catalystneuro/neuroconv#910
The text was updated successfully, but these errors were encountered: