-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
category: bugerrors in the code or code behaviorerrors in the code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)
Description
What happened?
pynwb 3.2.1, python
In ipfx we have a test 1 which triggers the warning:
ests/attach_metadata/test_nwb2_sink.py::test_serialize
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/pynwb/__init__.py:432: UserWarning: The file path provided: <_io.BytesIO object at 0x7f204e8dcea0> does not end in '.nwb'. It is recommended that NWB files using the HDF5 backend use the '.nwb' extension.
warn(f"The file path provided: {path} does not end in '.nwb'. "
Steps to Reproduce
$python
Python 3.9.23 (main, Aug 19 2025, 13:12:00)
[GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import h5py
>>> import pynwb
>>> import io
>>> data = io.BytesIO()
>>> h5file = h5py.File(data, "w")
>>> nwb_file = pynwb.NWBHDF5IO(path=h5file.filename, mode = "w", file = h5file)
/home/thomas/.venvs/ipfx-3.9/lib/python3.9/site-packages/pynwb/__init__.py:432: UserWarning: The file path provided: <_io.BytesIO object at 0x7fdd53d68ef0> does not end in '.nwb'. It is recommended that NWB files using the HDF5 backend use the '.nwb' extension.
warn(f"The file path provided: {path} does not end in '.nwb'. "
Traceback
Operating System
Linux
Python Executable
Python
Python Version
3.9
Package Versions
Code of Conduct
- I agree to follow this project's Code of Conduct
- Have you checked the Contributing document?
- Have you ensured this bug was not already reported?
Metadata
Metadata
Assignees
Labels
category: bugerrors in the code or code behaviorerrors in the code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)