xcube-dev / xcube-sh

An xcube plugin to allow generating data cubes from the Sentinel Hub Cloud API
MIT License
13 stars 9 forks source link

Custom xcube-sh cannot be exported #44

Closed maximlamare closed 3 years ago

maximlamare commented 3 years ago

I am generating an xcube using the xcube-sh library. I am getting the data from a BYOC collection, therefore setting dataset_name to CUSTOM and specifying a collection_id.

The cube generated this way contains attributes, including processing_level that is set to None by default.

When trying to save my cube:

mycube.to_zarr("./example_data/mycube.zarr")

the following error arises:

TypeError: Invalid value for attr 'processing_level': None must be a number, a string, an ndarray or a list/tuple of numbers/strings for serialization to netCDF files

I found that setting the processing_level to 0 solves the problem, but feel that this should be taken care of by default.

forman commented 3 years ago

Fixed in 0.6.3