You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pynwb 2.8.2 is not compatible with the dev version of HDMF. When using pynwb < 2.8.3 (just released) with the dev version of HDMF (which will soon be released), and trying to import NWBZarrIO, you get:
ImportError while importing test module '/home/runner/work/hdmf-zarr/hdmf-zarr/tests/unit/test_fsspec_streaming.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.13.0/x64/lib/python3.13/importlib/__init__.py:88: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_fsspec_streaming.py:2: in <module>
from hdmf_zarr import NWBZarrIO
/opt/hostedtoolcache/Python/3.13.0/x64/lib/python3.13/site-packages/hdmf_zarr/__init__.py:3: in <module>
from .nwb import NWBZarrIO
E ImportError: cannot import name 'NWBZarrIO' from 'hdmf_zarr.nwb' (/opt/hostedtoolcache/Python/3.13.0/x64/lib/python3.13/site-packages/hdmf_zarr/nwb.py)
The warning doesn't even show up for some reason, and the error hides the true error.
This shows up in the HDMF dev compatibility tests currently, until the pynwb requirement in hdmf-zarr is updated to 2.8.3.
The error should be more informative, and the import should perhaps be refactored.
def_raise_pynwb_import_error():
raiseImportError("pynwb is not installed. Please install pynwb to use NWBZarrIO.")
try:
frompynwbimport ...
classNWBZarrIO(ZarrIO):
# copy herepassexceptImportError:
NWBZarrIO=_raise_pynwb_import_error
What happened?
NWBZarrIO
is wrapped in a giant try/except that masks exceptions: https://github.com/hdmf-dev/hdmf-zarr/blob/dev/src/hdmf_zarr/nwb.py#L12pynwb 2.8.2 is not compatible with the dev version of HDMF. When using pynwb < 2.8.3 (just released) with the dev version of HDMF (which will soon be released), and trying to import
NWBZarrIO
, you get:The warning doesn't even show up for some reason, and the error hides the true error.
This shows up in the HDMF dev compatibility tests currently, until the pynwb requirement in hdmf-zarr is updated to 2.8.3.
The error should be more informative, and the import should perhaps be refactored.
Steps to Reproduce
Traceback
Operating System
macOS
Python Executable
Conda
Python Version
3.12
Package Versions
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: