Open
Description
When using Intake.open_netcdf('example.nc') and closing via ds.close(), the file is not closed, which causes problems when you want to delete the file in the program, for example.
In Intake-xarray/base.py
def close(self):
"""Delete open file from memory"""
if self._ds is not None:
self._ds.close() #Closes the file correctly
self._ds = None
self._schema = None
Without this modification, here's the error I get when I try to delete the netcdf file:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'data_2024-07-31.nc'
Metadata
Metadata
Assignees
Labels
No labels