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]: Compound dtype attributes are not supported #1099

Open
rly opened this issue Apr 19, 2024 · 2 comments · Fixed by catalystneuro/ndx-extracellular-channels#1
Open

[Bug]: Compound dtype attributes are not supported #1099

rly opened this issue Apr 19, 2024 · 2 comments · Fixed by catalystneuro/ndx-extracellular-channels#1
Assignees
Labels
category: bug errors in the code or code behavior
Milestone

Comments

@rly
Copy link
Contributor

rly commented Apr 19, 2024

What happened?

Compound dtype attributes are not supported, but the schema language says they should be: https://hdmf-schema-language.readthedocs.io/en/latest/description.html#attribute-specification-keys

Steps to Reproduce

NWBAttributeSpec(
                name="insertion_position_in_mm",
                doc=("Stereotactic coordinates (AP, ML, DV) of where the probe was inserted, in millimeters. "
                     "AP = anteroposterior coordinate in mm (+ is anterior). "
                     "ML = mediolateral coordinate in mm (+ is right). "
                     "DV = dorsoventral coordinate in mm (+ is up)."
                     "Coordinates are relative to `reference`"),
                dtype=[
                    NWBDtypeSpec(name="ap", dtype="float", doc="Anteroposterior coordinate in mm, relative to `reference` (+ is anterior).",),
                    NWBDtypeSpec(name="ml", dtype="float", doc="Mediolateral coordinate in mm, relative to `reference` (+ is right).",),
                    NWBDtypeSpec(name="dv", dtype="float", doc="Dorsoventral coordinate in mm, relative to `reference` (+ is up).",),
                ],
                required=False,
            ),

Traceback

TypeError: NWBAttributeSpec.__init__: incorrect type for 'dtype' (got 'list', expected 'str or RefSpec')

Operating System

macOS

Python Executable

Conda

Python Version

3.12

Package Versions

No response

@rly rly added the category: bug errors in the code or code behavior label Apr 19, 2024
@rly rly added this to the 3.14.0 milestone Apr 19, 2024
@rly
Copy link
Contributor Author

rly commented Apr 19, 2024

If this cannot be resolved soon, we should add it to the list at https://hdmf.readthedocs.io/en/stable/spec_language_support.html

@mavaylon1
Copy link
Contributor

I'll add this to my todo list. Thanks for the labels and milestone.

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

Successfully merging a pull request may close this issue.

2 participants