Description
What is your issue?
I hit this issue while using rioxarray with a series of operations similar to those noted in this issue corteva/rioxarray#614. After looking through the rioxarray
codebase a bit I was able to reproduce the issue with pure xarray
operations.
If the Dataset is opened with the default lock=True
settings, transposing a DataArray's coordinates and then copying the DataArray results in a cannot pickle '_thread.lock' object
exception.
If the Dataset is opened with lock=False
, no error is thrown.
This sample notebook reproduces the error.
This might be user error on my part, but it would be great to have some clarification on why lock=False
is necessary here as my understanding was that this should only be necessary when using parallel write operations.