This issue is exposed by adding a small test to test_filter_pipeline_v2
def test_filter_pipeline_compression_opts_v2():
with pyfive.File(FILTER_PIPELINE_V2_FILE) as hfile:
assert 'data' in hfile
d = hfile['data']
# the point of this test is to ensure we can actually retrieve the compression opts
x = d.compression_opts
This will fail with
@property
def compression_opts(self):
""" Compression filter options, None is no options/compression. """
if self._filter_ids is None:
return None
if GZIP_DEFLATE_FILTER in self._filter_ids:
gzip_entry = [d for d in self.filter_pipeline
if d['filter_id'] == GZIP_DEFLATE_FILTER][0]
> return gzip_entry['client_data'][0]
E KeyError: 'client_data'
pyfive/dataobjects.py:324: KeyError
which I think happens because the v2 spec has only client_data_values not client_data in this dictionary (to be clear, I do not know what the spec has, cause I can't find the details of this bit, but by inspection, this is the difference.)