with pynwb.NWBHDF5IO(src, "r") as ior, pynwb.NWBHDF5IO(dest, "w") as iow:
data = ior.read()
data.generate_new_id()
iow.export(ior, nwbfile=data)
gains some "unique" and odd thing expressed by h5py as
❯ grep StrDataset /home/yoh/.tmp/pytest-of-yoh/pytest-785/simple20/simple2.dump /home/yoh/.tmp/pytest-of-yoh/pytest-785/test_ambiguous0/simple2.dump
/home/yoh/.tmp/pytest-of-yoh/pytest-785/test_ambiguous0/simple2.dump: (0): "<StrDataset for HDF5 dataset "keywords": shape (2,), type "|O">"
Steps to Reproduce
and here is a full reproducer script
#!/usr/bin/env python3
import pynwb
import sys
src, dest = sys.argv[1:3]
print(f"Copying {src} {dest}")
with pynwb.NWBHDF5IO(src, "r") as ior, pynwb.NWBHDF5IO(dest, "w") as iow:
data = ior.read()
data.generate_new_id()
iow.export(ior, nwbfile=data)
print(f"Now reading {dest}")
with pynwb.NWBHDF5IO(dest, "r") as iow:
data = iow.read()
What happened?
More of background in https://github.com/dandi/dandi-cli/issues/1494#issuecomment-2332453413 and regression was introduced in https://github.com/hdmf-dev/hdmf/commit/2b167aedc8a8f58afd75d3d0c750f6d620dc663d
"copied" using
gains some "unique" and odd thing expressed by h5py as
Steps to Reproduce
which if ran on this file
http://www.oneukrainian.com/tmp/simple2.nwb
would result in
Traceback
No response
Operating System
Linux
Python Executable
Python
Python Version
3.12
Package Versions
No response