developmentseed / developmentseed/titiler-multidim

Zarr v3 + updated xarray cause ` TypeError: cannot pickle 'module' object`

Open
#97 2 comments 0 reactions 1 assignee Claimed by @jbusecke View on GitHub
Dominant language
Python
Stars
88
Forks
13
Avg merge
2d 53m
Merged PRs (30d)
10

Description

I noticed that some tests fail with
```
E TypeError: cannot pickle 'module' object
```
in the [`XarrayReader`](https://github.com/developmentseed/titiler-multidim/blob/7d8869db395c85e5714a7487062820ed0576f945/src/titiler/multidim/reader.py#L30)

This seems to only happen with caching is enabled (and only for the netcdf store)! To show this I have added an additional parametrization to the `app` test fixture which runs all tests both with and without cache.

**I did confirm that this error is introduced with the upgrade of either xarray or zarr here. When I just add the changes to `conftest.py` to main, all tests pass, so this was not a silent failure.**

Ill move on here for now, but I would love to fix this issue here. @hrodmn do you have any intuition why the caching would not play nice with a new xarray or zarr version?

_Originally posted by @jbusecke in https://github.com/developmentseed/titiler-multidim/issues/96#issuecomment-3309747859_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.