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

Use "cache_spec:False" in our copy_nwb_file helper while exporting NWB copy #1497

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dandi/pynwb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,16 @@ def copy_nwb_file(src: str | Path, dest: str | Path) -> str:
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)
iow.export(
ior,
nwbfile=data,
# do not export spec since
**(
{"cache_spec": False}
if Version(pynwb.__version__) > Version("2.8.2.dev11")
yarikoptic marked this conversation as resolved.
Show resolved Hide resolved
else {}
),
)
return str(dest)


Expand Down
Loading