Skip to content

Commit

Permalink
Use "cache_spec:False" in our copy_nwb_file helper while exporting NW…
Browse files Browse the repository at this point in the history
…B copy

Stopped since ideally we should make it dependent on either original
file contains the spec
  • Loading branch information
yarikoptic committed Sep 9, 2024
1 parent 44e097f commit ca7ddad
Showing 1 changed file with 10 additions and 1 deletion.
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")
else {}
),
)
return str(dest)


Expand Down

0 comments on commit ca7ddad

Please sign in to comment.