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]: Lack of error when writing containers that have no mapping in the TypeMap #1208

Open
rly opened this issue Nov 14, 2024 · 0 comments
Open
Assignees
Labels
category: enhancement improvements of code or code behavior
Milestone

Comments

@rly
Copy link
Contributor

rly commented Nov 14, 2024

What happened?

See rly/ndx-pose#36 for a MWE.

An informative error should be raised when a user tries to write an AbstractContainer object or really any object within the file hierarchy that is not known by HDMF (e.g., it is mapped to a spec or it is a DataChunkIterator or DataIO object -- there may be others in this category).

This is particularly bad in the example above where the user imports an extension after creating the IO object, so the IO object does not know about the extension, and then the user adds extension containers to the file and tries to write the file. HDMF/PyNWB writes the file without those extension containers and raises no warning or error.

Steps to Reproduce

See above.

Traceback

No response

Operating System

macOS

Python Executable

Conda

Python Version

3.12

Package Versions

No response

@rly rly added the category: enhancement improvements of code or code behavior label Nov 14, 2024
@rly rly added this to the Future milestone Nov 14, 2024
@rly rly changed the title [Bug]: Silent error when writing containers that have no mapping in the TypeMap [Bug]: Lack of error when writing containers that have no mapping in the TypeMap Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior
Projects
None yet
Development

No branches or pull requests

2 participants