flatironinstitute / mountainsort5

MountainSort spike sorting algorithm, version 5
Apache License 2.0
34 stars 8 forks source link

PermissionError: [WinError 32] #43

Open 410pfeliciano opened 2 months ago

410pfeliciano commented 2 months ago

I have installed MS5 in Spikeinterface v100.7 on Windows 11. I'm new to MS5 and trying to test it with a 5min recording. This is the following error:

Starting MountainSort5 Number of channels: 43 Number of timepoints: 9000000 Sampling frequency: 30000.0 Hz Channel 0: [1 1] Channel 1: [1 2] Channel 2: [1 3] Channel 3: [1 4] Channel 4: [2 9] Channel 5: [ 2 10] Channel 6: [ 2 11] Channel 7: [ 3 16] Channel 8: [ 3 17] Channel 9: [ 3 18] Channel 10: [ 5 23] Channel 11: [ 5 24] Channel 12: [ 5 25] Channel 13: [ 5 26] Channel 14: [ 6 31] Channel 15: [ 6 32] Channel 16: [ 6 33] Channel 17: [ 7 38] Channel 18: [ 7 39] Channel 19: [ 7 40] Channel 20: [ 7 41] ... Reordering units MS5 Elapsed time for reordering units: 0.003 seconds Creating sorting object MS5 Elapsed time for creating sorting object: 0.013 seconds

During handling of the above exception, another exception occurred:

PermissionError Traceback (most recent call last) Cell In[57], line 1 ----> 1 with TemporaryDirectory() as tmpdir: 2 # cache the recording to a temporary directory for efficient reading 3 recording_cached = create_cached_recording(recording_preprocessed, folder=tmpdir) 5 # sorting

File c:\Users\pdrfl\Anaconda3\envs\si_env\Lib\tempfile.py:943, in TemporaryDirectory.exit(self, exc, value, tb) 942 def exit(self, exc, value, tb): --> 943 self.cleanup()

File c:\Users\pdrfl\Anaconda3\envs\si_env\Lib\tempfile.py:947, in TemporaryDirectory.cleanup(self) 945 def cleanup(self): 946 if self._finalizer.detach() or _os.path.exists(self.name): ... --> 893 _os.unlink(path) 894 except IsADirectoryError: 895 cls._rmtree(path, ignore_errors=ignore_errors)

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: