Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nrsc opened this issue Aug 28, 2024 · 7 comments · Fixed by #2254
Closed

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

nrsc opened this issue Aug 28, 2024 · 7 comments · Fixed by #2254
Labels
bug Something isn't working NWB NeuroDataWithoutBorders file format

Comments

@nrsc
Copy link

nrsc commented Aug 28, 2024

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
Copy link
Collaborator

t-b commented Aug 29, 2024

This looks very similiar to NeurodataWithoutBorders/pynwb#1668. I'll followup on the linked issue.

@nrsc
Copy link
Author

nrsc commented Aug 29, 2024

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
Copy link
Collaborator

t-b commented Sep 1, 2024

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 t-b added bug Something isn't working NWB NeuroDataWithoutBorders file format labels Sep 1, 2024
@t-b
Copy link
Collaborator

t-b commented Sep 1, 2024

Note to self:

Created NeurodataWithoutBorders/pynwb#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
Copy link
Collaborator

t-b commented Sep 3, 2024

@nrsc We'll come up with a fix.

@t-b
Copy link
Collaborator

t-b commented Sep 3, 2024

Note to self: DisplayHelpTopic "HDF5 String Formats"

@nrsc
Copy link
Author

nrsc commented Sep 3, 2024

@t-b Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NWB NeuroDataWithoutBorders file format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants