From 905ef65d3a30aee1ae597a70adf24d060af5b077 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Fri, 16 Feb 2024 13:19:15 +0900 Subject: [PATCH] Try closing and removing downloaded file (#1847) --- docs/gallery/general/plot_read_basics.py | 7 +++++++ test.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/gallery/general/plot_read_basics.py b/docs/gallery/general/plot_read_basics.py index c4a829d75..0d684e5f5 100644 --- a/docs/gallery/general/plot_read_basics.py +++ b/docs/gallery/general/plot_read_basics.py @@ -283,3 +283,10 @@ # object and accessing its attributes, but it may be useful to explore the data in a # more interactive, visual way. See :ref:`analysistools-explore` for an updated list of programs for # exploring NWB files. + +#################### +# Close the open NWB file +# ----------------------- +# It is good practice, especially on Windows, to close any files that you have opened. + +io.close() diff --git a/test.py b/test.py index 8f6a403ee..c251fd838 100755 --- a/test.py +++ b/test.py @@ -276,7 +276,7 @@ def clean_up_tests(): "processed_data.nwb", "raw_data.nwb", "scratch_analysis.nwb", - # "sub-P11HMH_ses-20061101_ecephys+image.nwb", # TODO cannot delete this file on windows for some reason + "sub-P11HMH_ses-20061101_ecephys+image.nwb", "test_edit.nwb", "test_edit2.nwb", "test_cortical_surface.nwb",