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

[Bug]: ShapeError is not iterable #521

Closed
3 tasks done
rly opened this issue Oct 2, 2024 · 1 comment
Closed
3 tasks done

[Bug]: ShapeError is not iterable #521

rly opened this issue Oct 2, 2024 · 1 comment
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented Oct 2, 2024

What happened?

Command: nwbinspector --config dandi /path/to/file.nwb

Traceback (most recent call last):                                                                         
  File "/home/rly/mambaforge/envs/inspector/bin/nwbinspector", line 8, in <module>
    sys.exit(_inspect_all_cli())
             ^^^^^^^^^^^^^^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/nwbinspector/_inspection_cli.py", line 121, in _inspect_all_cli
    messages = list(
               ^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/nwbinspector/_inspection.py", line 188, in inspect_all
    for message in inspect_nwbfile(nwbfile_path=nwbfile_path, checks=checks, driver=driver):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rly/mambaforge/envs/inspector/lib/python3.12/site-packages/nwbinspector/_inspection.py", line 293, in inspect_nwbfile
    for validation_error in validation_namespace_errors:
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'ShapeError' object is not iterable

Not sure why validation_namespace_errors has type ShapeError.

Operating System

Linux

Python Version

3.12

Were you streaming with ROS3?

No

Package Versions

Package                   Version
------------------------- -----------
aiobotocore               2.15.1
aiohappyeyeballs          2.4.3
aiohttp                   3.10.8
aioitertools              0.12.0
aiosignal                 1.3.1
asciitree                 0.3.3
attrs                     24.2.0
botocore                  1.35.23
certifi                   2024.8.30
charset-normalizer        3.3.2
click                     8.1.7
fasteners                 0.19
frozenlist                1.4.1
fsspec                    2024.9.0
h5py                      3.12.1
hdmf                      3.14.4
hdmf_zarr                 0.9.0
idna                      3.10
isodate                   0.6.1
jmespath                  1.0.1
jsonschema                4.23.0
jsonschema-specifications 2023.12.1
multidict                 6.1.0
natsort                   8.4.0
numcodecs                 0.13.0
numpy                     1.26.4
nwbinspector              0.5.2
packaging                 24.1
pandas                    2.2.3
pip                       24.2
pynwb                     2.8.2
python-dateutil           2.9.0.post0
pytz                      2024.2
PyYAML                    6.0.2
referencing               0.35.1
requests                  2.32.3
rpds-py                   0.20.0
ruamel.yaml               0.18.6
ruamel.yaml.clib          0.2.8
s3fs                      2024.9.0
scipy                     1.14.1
setuptools                75.1.0
six                       1.16.0
threadpoolctl             3.5.0
tqdm                      4.66.5
tzdata                    2024.2
urllib3                   2.2.3
wheel                     0.44.0
wrapt                     1.16.0
yarl                      1.13.1
zarr                      2.18.3

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • Have you ensured this bug was not already reported?
  • To the best of your ability, have you ensured this is a bug within the code that checks the NWBFile, rather than a bug in the NWBFile reader (e.g., PyNWB or MatNWB)?
@rly rly added the category: bug errors in the code or code behavior label Oct 2, 2024
@rly
Copy link
Contributor Author

rly commented Oct 2, 2024

Of course, it was I who wrote the offending and confusing code in #425

This code appears to have been fixed or reverted since then. And running nwbinspector from the latest main branch on this file works without error.

@rly rly closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

No branches or pull requests

1 participant