Pyspectral incompatible with h5py=3.1.0
adybbroe opened this issue · 0 comments
adybbroe commented
Code Sample, a minimal, complete, and verifiable piece of code
# Your code here
>>> from pyspectral.rsr_reader import RelativeSpectralResponse
>>> rsr = RelativeSpectralResponse('NOAA-20', 'viirs')
Problem description
The code fails for latest versions of h5py (3.1.0 released Nov 6, 2020), see below!
Expected Output
Code should run without exceptions and return the RSR data for N20/VIIRS
Actual Result, Traceback if applicable
rsr data may not be up to date: /data/proj/safutv/.local/share/pyspectral/rsr_viirs_NOAA-20.h5
4494378it [00:02, 1923809.28it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/san1/opt/viirs_imagery_processor/releases/viirs_imagery_processor-0.2.65/lib/python3.8/site-packages/pyspectral/rsr_reader.py", line 125, in __init__
self.load()
File "/san1/opt/viirs_imagery_processor/releases/viirs_imagery_processor-0.2.65/lib/python3.8/site-packages/pyspectral/rsr_reader.py", line 174, in load
self.description = self.description.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
Versions of Python, package at hand and relevant dependencies
h5py=3.1.0
pyspectral=0.10.1
and latest master as of Nov 10, 2020
Thank you for reporting an issue !