Skip to content

[Bug]: Validator issue for nwbfile using ndx-multisubjects and ndx-sound #2219

Description

@nehatk17

What happened?

I've crated a group NWB file using ndx-sound and ndx-multisubjects; however, running the validator (dandi validate, nwbinspector, and pynwb-validate) results in an error:
ValueError: data type 'NdxMultiSubjectsNWBFile' not found in namespace ndx-sound

Steps to Reproduce

nwbinspector "filepath.nwb"

Traceback

**************************************************
NWBInspector Report Summary

Timestamp: 2026-07-06 14:22:32.533608-04:00
Platform: macOS-15.7.7-arm64-arm-64bit-Mach-O
NWBInspector version: 0.6.3

Found 1 issues over 1 files:
       1 - ERROR
**************************************************


0  ERROR
========

0.0  /Users/thoman1/Documents/Projects/EMBER/Code/Sanes/NWB_Sanes_1/sub-multisubject/sanes_multisubject_1.nwb: During io.read() - <class 'ValueError'>: data type 'NdxMultiSubjectsNWBFile' not found in namespace ndx-sound - 'None' object with name 'None'
       Message: Traceback (most recent call last):
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/hdmf/validate/validator.py", line 290, in get_validator
    return self.__validators[dt]
           ~~~~~~~~~~~~~~~~~^^^^
KeyError: 'NdxMultiSubjectsNWBFile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/nwbinspector/_nwb_inspection.py", line 281, in inspect_nwbfile
    validation_result = pynwb.validate(paths=[nwbfile_path])
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/hdmf/utils.py", line 596, in func_call
    return func(**pargs)
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/pynwb/validation.py", line 163, in validate
    validation_errors +=  _validate_single_file(path=p, **kwargs)
                          ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/pynwb/validation.py", line 227, in _validate_single_file
    validation_errors += _validate_helper(io=io, namespace=validation_namespace)
                         ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/pynwb/validation.py", line 24, in _validate_helper
    return validator.validate(builder)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/hdmf/utils.py", line 592, in func_call
    return func(args[0], **pargs)
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/hdmf/validate/validator.py", line 308, in validate
    validator = self.get_validator(dt)
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/hdmf/utils.py", line 592, in func_call
    return func(args[0], **pargs)
  File "/Users/thoman1/anaconda3/envs/nwb_neurconv_sleap/lib/python3.13/site-packages/hdmf/validate/validator.py", line 293, in get_validator
    raise ValueError(msg)
ValueError: data type 'NdxMultiSubjectsNWBFile' not found in namespace ndx-sound

Operating System

macOS

Python Executable

Conda

Python Version

3.13

Package Versions

environment_for_issue.txt

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions