# Buggy code
def _slice_area_from_bbox(self, src_area, dst_area, ll_bbox=None, xy_bbox=None):
    """Slice the provided area using the bounds provided."""
    if ll_bbox is not None:
        dst_area = AreaDefinition(
            "crop_area",
            "crop_area",
            "crop_latlong",
            {"proj": "latlong"},
            100,
            100,
            ll_bbox,
        )
    elif xy_bbox is not None:
        dst_area = AreaDefinition(
            "crop_area",
            "crop_area",
            "crop_xy",
            src_area.proj_dict,
            src_area.x_size,
            src_area.y_size,
            xy_bbox,
        )
    x_slice, y_slice = src_area.get_area_slices(dst_area)
    return src_area[y_slice, x_slice], y_slice, x_slice


# Traceback (NotImplementedError)
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Entering env context: <fiona.env.Env object at 0x000002426A002708>
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Starting outermost env
[DEBUG: 2020-03-29 12:19:40 : fiona.env] No GDAL environment exists
[DEBUG: 2020-03-29 12:19:40 : fiona.env] New GDAL environment <fiona._env.GDALEnv object at 0x0000024269FF6EC8> created
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Logging error handler pushed.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] All drivers registered.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] GDAL_DATA found in environment: '...anaconda3\\envs\\Sentinel5\\Library\\share\\gdal'.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] PROJ_LIB found in environment: '...anaconda3\\envs\\Sentinel5\\Library\\share\\proj'.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Started GDALEnv <fiona._env.GDALEnv object at 0x0000024269FF6EC8>.
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Updated existing <fiona._env.GDALEnv object at 0x0000024269FF6EC8> with options {}
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Entered env context: <fiona.env.Env object at 0x000002426A002708>
[DEBUG: 2020-03-29 12:19:40 : fiona.ogrext] Got coordinate system
[DEBUG: 2020-03-29 12:19:40 : fiona.ogrext] Got coordinate system
[DEBUG: 2020-03-29 12:19:40 : fiona.ogrext] Index: 0
[DEBUG: 2020-03-29 12:19:40 : fiona.collection] Flushed buffer
[DEBUG: 2020-03-29 12:19:40 : fiona.collection] Stopped session
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Exiting env context: <fiona.env.Env object at 0x000002426A002708>
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Cleared existing <fiona._env.GDALEnv object at 0x0000024269FF6EC8> options
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Stopping GDALEnv <fiona._env.GDALEnv object at 0x0000024269FF6EC8>.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Error handler popped.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Stopped GDALEnv <fiona._env.GDALEnv object at 0x0000024269FF6EC8>.
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Exiting outermost env
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Exited env context: <fiona.env.Env object at 0x000002426A002708>
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Entering env context: <fiona.env.Env object at 0x0000024269F94AC8>
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Starting outermost env
[DEBUG: 2020-03-29 12:19:40 : fiona.env] No GDAL environment exists
[DEBUG: 2020-03-29 12:19:40 : fiona.env] New GDAL environment <fiona._env.GDALEnv object at 0x000002426A02CD48> created
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Logging error handler pushed.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] All drivers registered.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] GDAL_DATA found in environment: '...anaconda3\\envs\\Sentinel5\\Library\\share\\gdal'.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] PROJ_LIB found in environment: '...anaconda3\\envs\\Sentinel5\\Library\\share\\proj'.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Started GDALEnv <fiona._env.GDALEnv object at 0x000002426A02CD48>.
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Updated existing <fiona._env.GDALEnv object at 0x000002426A02CD48> with options {}
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Entered env context: <fiona.env.Env object at 0x0000024269F94AC8>
[DEBUG: 2020-03-29 12:19:40 : fiona.ogrext] Got coordinate system
[DEBUG: 2020-03-29 12:19:40 : fiona.ogrext] Got coordinate system
[DEBUG: 2020-03-29 12:19:40 : fiona.ogrext] Index: 0
[DEBUG: 2020-03-29 12:19:40 : fiona.collection] Flushed buffer
[DEBUG: 2020-03-29 12:19:40 : fiona.collection] Stopped session
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Exiting env context: <fiona.env.Env object at 0x0000024269F94AC8>
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Cleared existing <fiona._env.GDALEnv object at 0x000002426A02CD48> options
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Stopping GDALEnv <fiona._env.GDALEnv object at 0x000002426A02CD48>.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Error handler popped.
[DEBUG: 2020-03-29 12:19:40 : fiona._env] Stopped GDALEnv <fiona._env.GDALEnv object at 0x000002426A02CD48>.
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Exiting outermost env
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Exited env context: <fiona.env.Env object at 0x0000024269F94AC8>
[DEBUG: 2020-03-29 12:24:31 : satpy.readers] Reading ['...anaconda3\\envs\\Sentinel5\\lib\\site-packages\\satpy\\etc\\readers\\msi_safe.yaml']
[DEBUG: 2020-03-29 12:24:31 : satpy.scene] Setting 'PPP_CONFIG_DIR' to '...anaconda3\envs\Sentinel5\lib\site-packages\satpy\etc'
[DEBUG: 2020-03-29 12:24:31 : satpy.readers] Reading ['...anaconda3\\envs\\Sentinel5\\lib\\site-packages\\satpy\\etc\\readers\\msi_safe.yaml']
[DEBUG: 2020-03-29 12:24:31 : satpy.readers.yaml_reader] Assigning to msi_safe: ['.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B8A.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B08.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B05.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B04.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B11.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B03.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B12.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B10.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_TCI.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B09.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B06.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B07.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B01.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\IMG_DATA\\T32UQV_20200319T101021_B02.jp2', '.\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438.SAFE\\GRANULE\\L1C_T32UQV_A024758_20200319T101336\\MTD_TL.xml']
[DEBUG: 2020-03-29 12:24:31 : satpy.composites] Looking for composites config file msi.yaml
[DEBUG: 2020-03-29 12:24:31 : satpy.composites] Looking for composites config file visir.yaml
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
[DEBUG: 2020-03-29 12:24:32 : satpy.readers.msi_safe] Reading B02.
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
[DEBUG: 2020-03-29 12:24:32 : satpy.readers.msi_safe] Reading B04.
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:543: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
proj_string = self.to_proj4()
[DEBUG: 2020-03-29 12:24:32 : satpy.readers.msi_safe] Reading B03.
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Applying sun zen correction
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Computing sun zenith angles.
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Apply the effective solar atmospheric path length correction method by Li and Shibata
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Sun-zenith correction applied. Computation time:   0.1 (sec)
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Applying sun zen correction
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Computing sun zenith angles.
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Apply the standard sun-zenith correction [1/cos(sunz)]
[DEBUG: 2020-03-29 12:24:32 : satpy.composites] Sun-zenith correction applied. Computation time:   0.1 (sec)
[INFO: 2020-03-29 12:24:32 : satpy.composites] Removing Rayleigh scattering with atmosphere 'us-standard' and aerosol type 'rayleigh_only' for 'B02'
[INFO: 2020-03-29 12:24:33 : pyspectral.rayleigh] Atmosphere chosen: us-standard
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] LUT filename: ...\AppData\Local\pytroll\pyspectral\rayleigh_only\rayleigh_lut_us-standard.h5
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rsr_reader] Filename: ...\AppData\Local\pytroll\pyspectral\rsr_msi_Sentinel-2A.h5
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rsr_reader] Filename: ...\AppData\Local\pytroll\pyspectral\rsr_msi_Sentinel-2A.h5
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rsr_reader] No detectors found - assume only one...
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] Band name: B02  Effective wavelength: 0.489455
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] Time - Interpolation: 0.082282
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Applying sun zen correction
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Computing sun zenith angles.
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Apply the effective solar atmospheric path length correction method by Li and Shibata
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Sun-zenith correction applied. Computation time:   0.1 (sec)
[INFO: 2020-03-29 12:24:33 : satpy.composites] Removing Rayleigh scattering with atmosphere 'us-standard' and aerosol type 'rayleigh_only' for 'B04'
[INFO: 2020-03-29 12:24:33 : pyspectral.rayleigh] Atmosphere chosen: us-standard
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] LUT filename:...\AppData\Local\pytroll\pyspectral\rayleigh_only\rayleigh_lut_us-standard.h5
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rsr_reader] Filename: ...\AppData\Local\pytroll\pyspectral\rsr_msi_Sentinel-2A.h5
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rsr_reader] Filename: ...\AppData\Local\pytroll\pyspectral\rsr_msi_Sentinel-2A.h5
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rsr_reader] No detectors found - assume only one...
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] Band name: B04  Effective wavelength: 0.664111
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] Time - Interpolation: 0.090826
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Applying sun zen correction
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Computing sun zenith angles.
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Apply the effective solar atmospheric path length correction method by Li and Shibata
[DEBUG: 2020-03-29 12:24:33 : satpy.composites] Sun-zenith correction applied. Computation time:   0.1 (sec)
[INFO: 2020-03-29 12:24:33 : satpy.composites] Removing Rayleigh scattering with atmosphere 'us-standard' and aerosol type 'rayleigh_only' for 'B03'
[INFO: 2020-03-29 12:24:33 : pyspectral.rayleigh] Atmosphere chosen: us-standard
[DEBUG: 2020-03-29 12:24:33 : pyspectral.rayleigh] LUT filename: ...\AppData\Local\pytroll\pyspectral\rayleigh_only\rayleigh_lut_us-standard.h5
[DEBUG: 2020-03-29 12:24:34 : pyspectral.rsr_reader] Filename: ...\AppData\Local\pytroll\pyspectral\rsr_msi_Sentinel-2A.h5
[DEBUG: 2020-03-29 12:24:34 : pyspectral.rsr_reader] Filename: ...\AppData\Local\pytroll\pyspectral\rsr_msi_Sentinel-2A.h5
[DEBUG: 2020-03-29 12:24:34 : pyspectral.rsr_reader] No detectors found - assume only one...
[DEBUG: 2020-03-29 12:24:34 : pyspectral.rayleigh] Band name: B03  Effective wavelength: 0.559090
[DEBUG: 2020-03-29 12:24:34 : pyspectral.rayleigh] Time - Interpolation: 0.088291
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='satellite_zenith_angle', wavelength=None, resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='solar_azimuth_angle', wavelength=None, resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='solar_zenith_angle', wavelength=None, resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B02', wavelength=(0.44, 0.49, 0.54), resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B04', wavelength=(0.645, 0.665, 0.685), resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='satellite_azimuth_angle', wavelength=None, resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B03', wavelength=(0.54, 0.56, 0.58), resolution=10, polarization=None, calibration=None, level=None, modifiers=())
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B02', wavelength=(0.44, 0.49, 0.54), resolution=10, polarization=None, calibration=None, level=None, modifiers=('effective_solar_pathlength_corrected',))
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B04', wavelength=(0.645, 0.665, 0.685), resolution=10, polarization=None, calibration=None, level=None, modifiers=('sunz_corrected',))
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B02', wavelength=(0.44, 0.49, 0.54), resolution=10, polarization=None, calibration=None, level=None, modifiers=('effective_solar_pathlength_corrected', 'rayleigh_corrected'))
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B04', wavelength=(0.645, 0.665, 0.685), resolution=10, polarization=None, calibration=None, level=None, modifiers=('effective_solar_pathlength_corrected',))
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B04', wavelength=(0.645, 0.665, 0.685), resolution=10, polarization=None, calibration=None, level=None, modifiers=('effective_solar_pathlength_corrected', 'rayleigh_corrected'))
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B03', wavelength=(0.54, 0.56, 0.58), resolution=10, polarization=None, calibration=None, level=None, modifiers=('effective_solar_pathlength_corrected',))
[DEBUG: 2020-03-29 12:24:34 : satpy.scene] Unloading dataset: DatasetID(name='B03', wavelength=(0.54, 0.56, 0.58), resolution=10, polarization=None, calibration=None, level=None, modifiers=('effective_solar_pathlength_corrected', 'rayleigh_corrected'))
[DEBUG: 2020-03-29 12:24:34 : satpy.writers] Reading ['...\\anaconda3\\envs\\Sentinel5\\lib\\site-packages\\satpy\\etc\\writers\\simple_image.yaml']
[DEBUG: 2020-03-29 12:24:35 : satpy.writers] Enhancement configuration options: [{'name': 'cira_stretch', 'method': <function cira_stretch at 0x000002426BDEA288>}]
[DEBUG: 2020-03-29 12:24:35 : satpy.enhancements] Applying the cira-stretch
[DEBUG: 2020-03-29 12:24:35 : satpy.writers.simple_image] Saving to image: .\S2A_MSIL1C_20200319T101021_N0209_R022_T32UQV_20200319T121438\RGB.png
...\anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\dask\core.py:121: RuntimeWarning: invalid value encountered in log
return func(*(_execute_task(a, cache) for a in args))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:294: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
projstring = _prepare_from_string(" ".join((projstring, projkwargs)))
{'sensor': {'msi'}, 'start_time': datetime.datetime(2020, 3, 19, 10, 10, 21), 'end_time': datetime.datetime(2020, 3, 19, 10, 10, 21)}
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
return _prepare_from_string(" ".join(pjargs))
...anaconda3\envs\Sentinel5\lib\site-packages\pyproj\crs\crs.py:294: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
projstring = _prepare_from_string(" ".join((projstring, projkwargs)))
[DEBUG: 2020-03-29 12:33:23 : satpy.scene] Setting 'PPP_CONFIG_DIR' to '...anaconda3\envs\Sentinel5\lib\site-packages\satpy\etc'
Traceback (most recent call last):
File "...\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\193.6911.25\plugins\python\helpers\pydev\pydevd.py", line 1434, in _exec
pydev_imports.execfile(file, globals, locals)  # execute the script
File "...AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\193.6911.25\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/Programmierung/Python/DataMining/Sentinel5/SentinelSatDownload.py", line 166, in <module>
crop_image_by_box(img, box_pos, folder)
File "D:/Programmierung/Python/DataMining/Sentinel5/SentinelSatDownload.py", line 51, in crop_image_by_box
scene_llbox = scn.crop(xy_bbox=bbox)
File "...anaconda3\envs\Sentinel5\lib\site-packages\satpy\scene.py", line 598, in crop
min_area, area, ll_bbox, xy_bbox)
File "...anaconda3\envs\Sentinel5\lib\site-packages\satpy\scene.py", line 481, in _slice_area_from_bbox
x_slice, y_slice = src_area.get_area_slices(dst_area)
File "...anaconda3\envs\Sentinel5\lib\site-packages\pyresample\geometry.py", line 1937, in get_area_slices
raise NotImplementedError("Source projection must be 'geos' if "
NotImplementedError: Source projection must be 'geos' if source/target projections are not equal.

Process finished with exit code 1

# Fixed code
def _slice_area_from_bbox(self, src_area, dst_area, ll_bbox=None, xy_bbox=None):
    """Slice the provided area using the bounds provided."""
    if ll_bbox is not None:
        dst_area = AreaDefinition(
            "crop_area",
            "crop_area",
            "crop_latlong",
            {"proj": "latlong"},
            100,
            100,
            ll_bbox,
        )
    elif xy_bbox is not None:
        crs = src_area.crs if hasattr(src_area, "crs") else src_area.proj_dict
        dst_area = AreaDefinition(
            "crop_area",
            "crop_area",
            "crop_xy",
            crs,
            src_area.x_size,
            src_area.y_size,
            xy_bbox,
        )
    x_slice, y_slice = src_area.get_area_slices(dst_area)
    return src_area[y_slice, x_slice], y_slice, x_slice