Sentinelhub-py: libdeflate_zlib_decompress errors with TIFF

I am stuck with an error while following the sentinelhub-py documentation. The examples work fine when the response is of MimeType.PNG but in the basic Example 3 the MimeType changes to TIFF to layer the 13 bands.

This is when the code results in an error:

request_all_bands = SentinelHubRequest(
    evalscript=evalscript_all_bands,
    input_data=[
        SentinelHubRequest.input_data(
            data_collection=DataCollection.SENTINEL2_L1C,
            time_interval=("2020-06-01", "2020-06-30"),
            mosaicking_order=MosaickingOrder.LEAST_CC,
        )
    ],
    responses=[SentinelHubRequest.output_response("default", MimeType.TIFF)],
    bbox=betsiboka_bbox,
    size=betsiboka_size,
    config=config,
)

all_bands_response = request_all_bands.get_data()

DeflateError: libdeflate_zlib_decompress returned LIBDEFLATE_INSUFFICIENT_SPACE

I don’t see where in the sentinelhub code zlib is called or why I can’t output to a .TIFF file. Can someone guide me in the right direction? Thank you in advance

I’ve got an update and a solution.

The problem occurs when using Python 3.11 and sentinelhub Version: 3.9.0
There is no error when using Python 3.7.x and sentinelhub Version: 3.8.4

Hi @francode ,

We recommend using the latest sentinelhub python package. The sentinelhub python package currently supports python 3.8 | 3.9 | 3.10 (see documentation), which could be why you got an error when using python 3.11.

1 Like