# Buggy code
def _get_full_angles(self):
    solar_zenith = np.hstack(
        (
            self["ANGULAR_RELATIONS_FIRST"][:, [0]],
            self["ANGULAR_RELATIONS"][:, :, 0],
            self["ANGULAR_RELATIONS_LAST"][:, [0]],
        )
    )

    sat_zenith = np.hstack(
        (
            self["ANGULAR_RELATIONS_FIRST"][:, [1]],
            self["ANGULAR_RELATIONS"][:, :, 1],
            self["ANGULAR_RELATIONS_LAST"][:, [1]],
        )
    )

    solar_azimuth = np.hstack(
        (
            self["ANGULAR_RELATIONS_FIRST"][:, [2]],
            self["ANGULAR_RELATIONS"][:, :, 2],
            self["ANGULAR_RELATIONS_LAST"][:, [2]],
        )
    )
    sat_azimuth = np.hstack(
        (
            self["ANGULAR_RELATIONS_FIRST"][:, [3]],
            self["ANGULAR_RELATIONS"][:, :, 3],
            self["ANGULAR_RELATIONS_LAST"][:, [3]],
        )
    )

    nav_sample_rate = self["NAV_SAMPLE_RATE"]
    earth_views_per_scanline = self["EARTH_VIEWS_PER_SCANLINE"]
    if nav_sample_rate == 20 and earth_views_per_scanline == 2048:
        from geotiepoints import metop20kmto1km

        # Note: interpolation asumes lat values values between -90 and 90
        # Solar and satellite zenith is between 0 and 180.
        solar_zenith -= 90
        sun_azi, sun_zen = metop20kmto1km(solar_azimuth, solar_zenith)
        sun_zen += 90
        sat_zenith -= 90
        sat_azi, sat_zen = metop20kmto1km(sat_azimuth, sat_zenith)
        sat_zen += 90
        return sun_azi, sun_zen, sat_azi, sat_zen
    else:
        raise NotImplementedError(
            "Angles expansion not implemented for "
            + "sample rate = "
            + str(nav_sample_rate)
            + " and earth views = "
            + str(earth_views_per_scanline)
        )


# Traceback (ValueError)
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps
[ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, level=None, modifiers=())': Too many ('veadr', 1)
Traceback (most recent call last):
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 722, in _load_dataset_with_area
ds = self._load_dataset_data(file_handlers, dsid)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 602, in _load_dataset_data
proj = self._load_dataset(dsid, ds_info, file_handlers)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 578, in _load_dataset
projectable = fh.get_dataset(dsid, ds_info)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/eps_l1b.py", line 309, in get_dataset
self._read_all(self.filename)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/eps_l1b.py", line 174, in _read_all
raise ValueError("Too many " + str((rec_class, sub_class)))
ValueError: Too many ('veadr', 1)
[DEBUG: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] No coordinates found for DatasetID(name='latitude', wavelength=None, resolution=1050, polarization=None, calibration=None, level=None, modifiers=())
Traceback (most recent call last):
File "/software/pytroll/scripts/test-veadr.py", line 10, in <module>
global_scene.load(['overview'])
File "/software/pytroll/lib/python3.5/site-packages/satpy/scene.py", line 967, in load
self.read(**kwargs)
File "/software/pytroll/lib/python3.5/site-packages/satpy/scene.py", line 875, in read
return self._read_datasets(nodes, **kwargs)
File "/software/pytroll/lib/python3.5/site-packages/satpy/scene.py", line 716, in _read_datasets
new_datasets = reader_instance.load(ds_ids, **kwargs)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 794, in load
ds = self._load_dataset_with_area(dsid, coords)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 722, in _load_dataset_with_area
ds = self._load_dataset_data(file_handlers, dsid)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 602, in _load_dataset_data
proj = self._load_dataset(dsid, ds_info, file_handlers)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/yaml_reader.py", line 578, in _load_dataset
projectable = fh.get_dataset(dsid, ds_info)
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/eps_l1b.py", line 312, in get_dataset
lons, lats = self.get_full_lonlats()
File "/software/pytroll/lib/python3.5/site-packages/satpy/readers/eps_l1b.py", line 232, in get_full_lonlats
shape=(self.scanlines, self.pixels))
File "/software/pytroll/lib/python3.5/site-packages/dask/array/core.py", line 2406, in from_delayed
return Array(graph, name, chunks, dtype)
File "/software/pytroll/lib/python3.5/site-packages/dask/array/core.py", line 880, in __new__
self._chunks = normalize_chunks(chunks, shape, dtype=self.dtype)
File "/software/pytroll/lib/python3.5/site-packages/dask/array/core.py", line 1995, in normalize_chunks
return tuple(tuple(int(x) if not math.isnan(x) else x for x in c) for c in chunks)
File "/software/pytroll/lib/python3.5/site-packages/dask/array/core.py", line 1995, in <genexpr>
return tuple(tuple(int(x) if not math.isnan(x) else x for x in c) for c in chunks)
File "/software/pytroll/lib/python3.5/site-packages/dask/array/core.py", line 1995, in <genexpr>
return tuple(tuple(int(x) if not math.isnan(x) else x for x in c) for c in chunks)
TypeError: a float is required

# Fixed code
def _get_full_angles(self, solar_zenith, sat_zenith, solar_azimuth, sat_azimuth):
    nav_sample_rate = self["NAV_SAMPLE_RATE"]
    if nav_sample_rate == 20 and self.pixels == 2048:
        from geotiepoints import metop20kmto1km

        # Note: interpolation asumes lat values values between -90 and 90
        # Solar and satellite zenith is between 0 and 180.
        solar_zenith -= 90
        sun_azi, sun_zen = metop20kmto1km(solar_azimuth, solar_zenith)
        sun_zen += 90
        sat_zenith -= 90
        sat_azi, sat_zen = metop20kmto1km(sat_azimuth, sat_zenith)
        sat_zen += 90
        return sun_azi, sun_zen, sat_azi, sat_zen
    else:
        raise NotImplementedError(
            "Angles expansion not implemented for "
            + "sample rate = "
            + str(nav_sample_rate)
            + " and earth views = "
            + str(self.pixels)
        )