AllenInstitute / MIES

Multichannel Igor Electrophysiology Suite
https://alleninstitute.github.io/MIES/user.html
Other
23 stars 7 forks source link

error: nwb_version "b'2.2.4'" is not a proper semantic version. See http://semver.org #2243

Closed nrsc closed 1 month ago

nrsc commented 2 months ago

Hello All,

I've run a mass file conversion from pxp to nwbV2 using MEIS (2.7_20230809-990-ga2063f945), and eventually when trying to upload the nwb files as a dandiset I get an error during the validation.

The good folks over at dandi seem to think issue is that the nwb version is being written as a fixed length string instead of a variable length string during the conversion, and this causes the nwb file to fail validation and file will not be uploaded to the server.

Looks like I may have a quick fix to rewrite the nwb_version attribute as a variable length string, and I will follow up on that.

Scott

t-b commented 2 months ago

This looks very similiar to https://github.com/NeurodataWithoutBorders/pynwb/issues/1668. I'll followup on the linked issue.

nrsc commented 2 months ago

Thank you @t-b. Did this as a mass convert from pxp using the macro built into this version of MEIS. I have been interested though in why I am getting v2.2.4 out of the conversion given that nwb seems to be a few versions ahead of this one. Could that be part of the issue?

t-b commented 2 months ago

I have been interested though in why I am getting v2.2.4 out of the conversion given that nwb seems to be a few versions ahead of this one. Could that be part of the issue?

I don't think so as nothing in the nwb schema has changed in that regard. I'll chat with Tim about this issue here.

t-b commented 2 months ago

Note to self:

Created https://github.com/NeurodataWithoutBorders/pynwb/issues/1953 for the python runtime warning:

$python -m pynwb.validate AB_SweepsFromMultipleDevices-compressed-V2.nwb 
<frozen runpy>:128: RuntimeWarning: 'pynwb.validate' found in sys.modules after import of package 'pynwb', but prior to execution of 'pynwb.validate'; this may result in unpredictable behaviour
Validating AB_SweepsFromMultipleDevices-compressed-V2.nwb against cached namespace information using namespace 'ndx-mies'.
 - no errors found.
$python -m pynwb.validate --no-cached-namespace AB_SweepsFromMultipleDevices-compressed-V2.nwb 
<frozen runpy>:128: RuntimeWarning: 'pynwb.validate' found in sys.modules after import of package 'pynwb', but prior to execution of 'pynwb.validate'; this may result in unpredictable behaviour
Validating AB_SweepsFromMultipleDevices-compressed-V2.nwb against PyNWB namespace information using namespace 'core'.
 - found the following errors:
VectorIndex/description (general/intracellular_ephys/sweep_table/series_index): argument missing
VectorIndex (general/intracellular_ephys/sweep_table/series_index): incorrect type - expected 'uint8', got 'int32'
VectorIndex/description (intervals/epochs/tags_index): argument missing
VectorIndex (intervals/epochs/tags_index): incorrect type - expected 'uint8', got 'int32'
VectorIndex/description (intervals/epochs/timeseries_index): argument missing
VectorIndex (intervals/epochs/timeseries_index): incorrect type - expected 'uint8', got 'int32'
$dandi validate AB_SweepsFromMultipleDevices-compressed-V2.nwb 
[DANDI.NO_DANDISET_FOUND] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — Path is not inside a Dandiset
[pywnb.GENERIC] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — error: nwb_version "b'2.2.4'" is not a proper semantic version. See http://semver.org
[NWBI.check_intracellular_electrode_cell_id_exists] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — Please include a unique cell_id associated with this IntracellularElectrode.
[NWBI.check_subject_age] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — Subject is missing age and date_of_birth. Please specify at least one of these fields.
[NWBI.check_subject_id_exists] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — subject_id is missing.
[NWBI.check_subject_sex] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — Subject.sex is missing.
[NWBI.check_subject_species_exists] /home/thomas/devel/mies/Packages/tests/Basic/input/AB_SweepsFromMultipleDevices-compressed-V2.nwb — Subject species is missing.
2024-09-01 11:13:59,859 [    INFO] Logs saved in /home/thomas/.local/state/dandi-cli/log/2024.09.01-09.13.56Z-11235.log
(
t-b commented 1 month ago

@nrsc We'll come up with a fix.

t-b commented 1 month ago

Note to self: DisplayHelpTopic "HDF5 String Formats"

nrsc commented 1 month ago

@t-b Thanks!