# Buggy code
def _read_all(self, filename):
    LOG.debug("Reading %s", filename)
    self.records, self.form = read_raw(filename)
    self.mdrs = [
        record
        for record in self.records
        if record_class[record["record_class"]] == "mdr"
    ]
    self.iprs = [
        record
        for record in self.records
        if record_class[record["record_class"]] == "ipr"
    ]
    self.scanlines = len(self.mdrs)
    self.sections = {("mdr", 2): np.hstack(self.mdrs)}
    self.sections[("ipr", 0)] = np.hstack(self.iprs)
    for record in self.records:
        rec_class = record_class[record["record_class"]]
        sub_class = record["RECORD_SUBCLASS"]
        if rec_class in ["mdr", "ipr"]:
            continue
        if (rec_class, sub_class) in self.sections:
            raise ValueError("Too many " + str((rec_class, sub_class)))
        else:
            self.sections[(rec_class, sub_class)] = record
    self.pixels = self["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 _read_all(self):
    logger.debug("Reading %s", self.filename)
    self.sections, self.form = read_records(self.filename)
    self.scanlines = self["TOTAL_MDR"]
    if self.scanlines != len(self.sections[("mdr", 2)]):
        logger.warning(
            "Number of declared records doesn't match number of scanlines in the file."
        )
    self.pixels = self["EARTH_VIEWS_PER_SCANLINE"]