# Buggy code
def __call__(self, *args, **kwargs):
    """Call the compositor."""
    from satpy import Scene

    # Check if filename exists, if not then try from SATPY_ANCPATH
    if not os.path.isfile(self.filename):
        tmp_filename = os.path.join(get_environ_ancpath(), self.filename)
        if os.path.isfile(tmp_filename):
            self.filename = tmp_filename
    scn = Scene(reader="generic_image", filenames=[self.filename])
    scn.load(["image"])
    img = scn["image"]
    # use compositor parameters as extra metadata
    # most important: set 'name' of the image
    img.attrs.update(self.attrs)
    # Check for proper area definition.  Non-georeferenced images
    # have None as .ndim
    if img.area.ndim is None:
        if self.area is None:
            raise AttributeError("Area definition needs to be configured")
        img.attrs["area"] = self.area
    img.attrs["sensor"] = None
    img.attrs["mode"] = "".join(img.bands.data)
    img.attrs.pop("modifiers", None)
    img.attrs.pop("calibration", None)
    # Add start time if not present in the filename
    if "start_time" not in img.attrs or not img.attrs["start_time"]:
        import datetime as dt

        img.attrs["start_time"] = dt.datetime.utcnow()
    if "end_time" not in img.attrs or not img.attrs["end_time"]:
        import datetime as dt

        img.attrs["end_time"] = dt.datetime.utcnow()

    return img


# Traceback (AttributeError)
[DEBUG: 2019-06-26 09:01:32 : satpy.readers.yaml_reader] No coordinates found for DatasetID(name='image', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2019-06-26 09:01:32 : satpy.readers.generic_image] Reading DatasetID(name='image', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=()).
Traceback (most recent call last):
File "make_msg3_static_day.py", line 190, in <module>
global_scene.load([composite])
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/scene.py", line 969, in load
keepables = self.generate_composites()
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/scene.py", line 884, in generate_composites
return self._read_composites(nodes)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/scene.py", line 858, in _read_composites
self._generate_composite(item, keepables)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/scene.py", line 833, in _generate_composite
**self.attrs)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/composites/__init__.py", line 1415, in __call__
if img.area.ndim is None:
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/xarray/core/common.py", line 179, in __getattr__
(type(self).__name__, name))
AttributeError: 'DataArray' object has no attribute 'area'

# Fixed code
def __call__(self, *args, **kwargs):
    """Call the compositor."""
    from satpy import Scene

    # Check if filename exists, if not then try from SATPY_ANCPATH
    if not os.path.isfile(self.filename):
        tmp_filename = os.path.join(get_environ_ancpath(), self.filename)
        if os.path.isfile(tmp_filename):
            self.filename = tmp_filename
    scn = Scene(reader="generic_image", filenames=[self.filename])
    scn.load(["image"])
    img = scn["image"]
    # use compositor parameters as extra metadata
    # most important: set 'name' of the image
    img.attrs.update(self.attrs)
    # Check for proper area definition.  Non-georeferenced images
    # do not have `area` in the attributes
    if "area" not in img.attrs:
        if self.area is None:
            raise AttributeError("Area definition needs to be configured")
        img.attrs["area"] = self.area
    img.attrs["sensor"] = None
    img.attrs["mode"] = "".join(img.bands.data)
    img.attrs.pop("modifiers", None)
    img.attrs.pop("calibration", None)
    # Add start time if not present in the filename
    if "start_time" not in img.attrs or not img.attrs["start_time"]:
        import datetime as dt

        img.attrs["start_time"] = dt.datetime.utcnow()
    if "end_time" not in img.attrs or not img.attrs["end_time"]:
        import datetime as dt

        img.attrs["end_time"] = dt.datetime.utcnow()

    return img