-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionError
when using to_xarray
on Windows
#70
Comments
This was apparently caused by the switch from Possibly relevant issue. |
to_xarray
broken on Windows?PermissionError
when using to_xarray
on Windows
By default, rioxarray lazyily loads datasets. On Windows, this causes a PermissionError when the temporary directory containing the downloaded files is deleted, as it is still open in rioxarray. To avoid that issue, we now explicitly load the dataset into memory, allowing tempfiles to be removed. This will potentially increase memory usage in some use cases, but given the size limitations of datasets downloaded from Earth Engine, that should never be a practical problem.
By default, rioxarray lazyily loads datasets. On Windows, this causes a PermissionError when the temporary directory containing the downloaded files is deleted, as it is still open in rioxarray. To avoid that issue, we now explicitly load the dataset into memory, allowing tempfiles to be removed. This will potentially increase memory usage in some use cases, but given the size limitations of datasets downloaded from Earth Engine, that should never be a practical problem.
It looks like there's a bug in the temp directory handling for
0.4.0
that only seems to affect Windows (and therefore not the CI workflow). It's also possible this was introduced with Windows 11, since I upgraded recently.This would be handled automatically by resolving #19, so if this isn't a quick fix I may need to wait for that.
Reproducing
Raises:
The text was updated successfully, but these errors were encountered: