Open bendichter opened 5 years ago
I am not generating this file myself, so I can't easily pare it down and isolate the issue. If you would like to work on this, let me know and I'll send the file.
Looking at the code, I think the received
object when calling def check_shape(expected, received):
must be None
here (otherwise if expected
would be None
the function should have returned True
already). This means in pynwb/form/validate/validator.py", line 372, in if not check_shape(self.spec.shape, shape):
the variable shape
which is computed by get_shape(data)
in line 371
seems to evaluate to None
for some reason.
I think to get a more informative error message all you should need to do is to change line 372
in pynwb/src/pynwb/form/validate/validator.py
from if not check_shape(self.spec.shape, shape):
to if shape is None or (not check_shape(self.spec.shape, shape)):
. Note, I believe this change would probably need to be done in HDMF rather than in PyNWB (since pynwb.form is being moved to HDMF) @ajtritt .
Feature Request
The error messages in the pynwb validator could be more helpful. For instance, I am trying to validate a file right now and I am getting the error:
It would be nice if I knew which object is causing this error.
Checklist