You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We hit this issue while using rioxarray with a series of operations similar to those noted in this issue corteva/rioxarray#711. After looking through the rioxarray codebase a bit I was able to reproduce the issue with pure xarray operations.
When opening a Dataset with fsspeclocal caching enabled, transposing a DataArray's coordinates and then copying the DataArray results in a cannot pickle '_io.BufferedReader' object exception.
Note that when using the filecache option with fsspec.filesystem the exception occurs immediately. When using the blockcache option the exception only occurs after a second copy call which is presumably using cached data.
This issue seems potentially related to the fsspec investigation in fsspec/filesystem_spec#579 (comment) but interestingly only seems reproducible with this incantation of transpose followed by copy.
The text was updated successfully, but these errors were encountered:
Do this & #8442 require using an S3 backend? If not, is it possible to produce examples which are copy-pastable?
(sorry this hasn't got much attention — some of these cross-library issues are difficult. I can't guarantee an MCVE will be sufficient, though it is necessary...)
max-sixty
added
needs mcve
https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
and removed
needs triage
Issue that has not been reviewed by xarray team member
labels
Dec 5, 2023
@max-sixty Apologies for not providing an MCVE. Initially I thought this was S3 backend specific but I am able to reproduce locally with fsspec target_protocol=file as well.
No worries about the lack of attention, I realize that issues dealing with fsspec interactions are likely very difficult to debug. Thank you for investigating 👍
I'm not completely sure what's going on. I'm guessing the dataset references the file path, and so attempts to copy it when the dataset is being copied. But why does it try to pickle it? I though pickling was for serializing, which this isn't trying to do...
What is your issue?
We hit this issue while using rioxarray with a series of operations similar to those noted in this issue corteva/rioxarray#711. After looking through the rioxarray codebase a bit I was able to reproduce the issue with pure xarray operations.
When opening a Dataset with
fsspec
local caching enabled, transposing a DataArray's coordinates and then copying the DataArray results in acannot pickle '_io.BufferedReader' object
exception.The issue can be reproduced using this sample notebook.
Note that when using the
filecache
option withfsspec.filesystem
the exception occurs immediately. When using theblockcache
option the exception only occurs after a secondcopy
call which is presumably using cached data.This issue seems potentially related to the
fsspec
investigation in fsspec/filesystem_spec#579 (comment) but interestingly only seems reproducible with this incantation oftranspose
followed bycopy
.The text was updated successfully, but these errors were encountered: