Skip to content

Recording files not released #1790

@RikkelBob

Description

@RikkelBob

I'm trying to do batch processing of my probes / sessions. All my data is located on a network attached storage (NAS). To be able to point to one of my .dat files as a recording object, I first move the file to a temp folder on my C:/ drive, preprocess, save the preprocessed copy to the same folder. Then I perform sorting on that file. After sorting, I move the output back to the NAS.

Then, I'd like to remove all the temporary files from my C:/ drive using shutil.rmtree(temp_path). However, python throws a PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:

Is there a way to release my files so they can be deleted? Or, if not, a way to directly read data from a network drive? It seems si.read.binary cannot deal with windows networks path (i.e. "//NAS/MyName/AcquisitionPC/").

I've tried del() on all the recording, waveformextractor and sorting objects, after which I call gc.collect(). This doesn't solve it.

(I swear this will be my last issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionGeneral question regarding SI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions