pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

Unittest failure in test_modifiers.py #1959

Closed avalentino closed 2 years ago

avalentino commented 2 years ago

Describe the bug Unit tests fails for test_modifiers.TestAngleGeneration on Debian and Ubuntu.

To Reproduce

$ python3 -m pytest -k test_modifiers --ignore=satpy/tests/reader_tests/test_msi_safe.py --ignore=satpy/tests/reader_tests/test_sar_c_safe.py

Expected behavior All unittests pass.

Actual results Text output of actual results or error messages including full tracebacks if applicable.

$ python3 -m pytest -k test_modifiers --ignore=satpy/tests/reader_tests/test_msi_safe.py --ignore=satpy/tests/reader_tests/test_sar_c_safe.py
======================================================== test session starts ========================================================
platform linux -- Python 3.9.7, pytest-6.0.2, py-1.10.0, pluggy-0.13.0
rootdir: /home/antonio/projects/forks/satpy
plugins: lazy-fixture-0.6.3, hypothesis-5.43.3, remotedata-0.3.2, doctestplus-0.9.0, openfiles-0.5.0, flake8-1.0.6, arraydiff-0.3, filter-subpackage-0.1.1, astropy-header-0.1.2, timeout-1.4.1, cov-2.10.1, cython-0.1.0
collected 1415 items / 1391 deselected / 24 selected                                                                                

satpy/tests/test_modifiers.py ................FFFFFFFF                                                                        [100%]

============================================================= FAILURES ==============================================================
_____________________________________ TestAngleGeneration.test_get_angles[_get_angle_test_data] _____________________________________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fd530430>
input_func = <function _get_angle_test_data at 0x7fd22687b280>

    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_get_angles(self, input_func):
        """Test sun and satellite angle calculation."""
        from satpy.modifiers.angles import get_angles
        data = input_func()

        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol:
            angles = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in angles)
            da.compute(angles)

        # get_observer_look should have been called once per array chunk
>       assert gol.call_count == data.data.blocks.size
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:517: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((2, 2, 1), (2, 2, 1))
_________________________________ TestAngleGeneration.test_get_angles[_get_stacked_angle_test_data] _________________________________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fbca0100>
input_func = <function _get_stacked_angle_test_data at 0x7fd22687b310>

    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_get_angles(self, input_func):
        """Test sun and satellite angle calculation."""
        from satpy.modifiers.angles import get_angles
        data = input_func()

        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol:
            angles = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in angles)
            da.compute(angles)

        # get_observer_look should have been called once per array chunk
>       assert gol.call_count == data.data.blocks.size
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:517: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((5,), (2, 2, 1))
__________________________ TestAngleGeneration.test_cache_get_angles[_get_angle_test_data-<lambda>-True-4] __________________________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fbc5eb80>
input_func = <function _get_angle_test_data at 0x7fd22687b280>
input2_func = <function TestAngleGeneration.<lambda> at 0x7fd22687b5e0>, exp_equal_sun = True, exp_num_zarr = 4
tmpdir = local('/tmp/pytest-of-antonio/pytest-1/test_cache_get_angles__get_ang0')

    @pytest.mark.parametrize(
        ("input2_func", "exp_equal_sun", "exp_num_zarr"),
        [
            (lambda x: x, True, 4),
            (_similar_sat_pos_datetime, False, 4),
            (_diff_sat_pos_datetime, False, 6),
        ]
    )
    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_cache_get_angles(self, input_func, input2_func, exp_equal_sun, exp_num_zarr, tmpdir):
        """Test get_angles when caching is enabled."""
        from satpy.modifiers.angles import (
            STATIC_EARTH_INERTIAL_DATETIME,
            _get_sensor_angles_from_sat_pos,
            _get_valid_lonlats,
            get_angles,
        )

        # Patch methods
        data = input_func()
        additional_cache = exp_num_zarr > 4

        # Compute angles
        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol, \
                satpy.config.set(cache_lonlats=True, cache_sensor_angles=True, cache_dir=str(tmpdir)):
            res = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in res)

            # call again, should be cached
            new_data = input2_func(data)
            res2 = get_angles(new_data)
            assert all(isinstance(x, xr.DataArray) for x in res2)
            res, res2 = da.compute(res, res2)
            for r1, r2 in zip(res[:2], res2[:2]):
                if additional_cache:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)
                else:
                    np.testing.assert_allclose(r1, r2)

            for r1, r2 in zip(res[2:], res2[2:]):
                if exp_equal_sun:
                    np.testing.assert_allclose(r1, r2)
                else:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)

            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == exp_num_zarr  # two for lon/lat, one for sata, one for satz

            _get_sensor_angles_from_sat_pos.cache_clear()
            _get_valid_lonlats.cache_clear()
            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == 0

>       assert gol.call_count == data.data.blocks.size * (int(additional_cache) + 1)
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:577: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((2, 2, 1), (2, 2, 1))
_________________ TestAngleGeneration.test_cache_get_angles[_get_angle_test_data-_similar_sat_pos_datetime-False-4] _________________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fbc973a0>
input_func = <function _get_angle_test_data at 0x7fd22687b280>, input2_func = <function _similar_sat_pos_datetime at 0x7fd22687b3a0>
exp_equal_sun = False, exp_num_zarr = 4, tmpdir = local('/tmp/pytest-of-antonio/pytest-1/test_cache_get_angles__get_ang1')

    @pytest.mark.parametrize(
        ("input2_func", "exp_equal_sun", "exp_num_zarr"),
        [
            (lambda x: x, True, 4),
            (_similar_sat_pos_datetime, False, 4),
            (_diff_sat_pos_datetime, False, 6),
        ]
    )
    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_cache_get_angles(self, input_func, input2_func, exp_equal_sun, exp_num_zarr, tmpdir):
        """Test get_angles when caching is enabled."""
        from satpy.modifiers.angles import (
            STATIC_EARTH_INERTIAL_DATETIME,
            _get_sensor_angles_from_sat_pos,
            _get_valid_lonlats,
            get_angles,
        )

        # Patch methods
        data = input_func()
        additional_cache = exp_num_zarr > 4

        # Compute angles
        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol, \
                satpy.config.set(cache_lonlats=True, cache_sensor_angles=True, cache_dir=str(tmpdir)):
            res = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in res)

            # call again, should be cached
            new_data = input2_func(data)
            res2 = get_angles(new_data)
            assert all(isinstance(x, xr.DataArray) for x in res2)
            res, res2 = da.compute(res, res2)
            for r1, r2 in zip(res[:2], res2[:2]):
                if additional_cache:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)
                else:
                    np.testing.assert_allclose(r1, r2)

            for r1, r2 in zip(res[2:], res2[2:]):
                if exp_equal_sun:
                    np.testing.assert_allclose(r1, r2)
                else:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)

            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == exp_num_zarr  # two for lon/lat, one for sata, one for satz

            _get_sensor_angles_from_sat_pos.cache_clear()
            _get_valid_lonlats.cache_clear()
            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == 0

>       assert gol.call_count == data.data.blocks.size * (int(additional_cache) + 1)
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:577: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((2, 2, 1), (2, 2, 1))
__________________ TestAngleGeneration.test_cache_get_angles[_get_angle_test_data-_diff_sat_pos_datetime-False-6] ___________________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fbc7fe20>
input_func = <function _get_angle_test_data at 0x7fd22687b280>, input2_func = <function _diff_sat_pos_datetime at 0x7fd22687b430>
exp_equal_sun = False, exp_num_zarr = 6, tmpdir = local('/tmp/pytest-of-antonio/pytest-1/test_cache_get_angles__get_ang2')

    @pytest.mark.parametrize(
        ("input2_func", "exp_equal_sun", "exp_num_zarr"),
        [
            (lambda x: x, True, 4),
            (_similar_sat_pos_datetime, False, 4),
            (_diff_sat_pos_datetime, False, 6),
        ]
    )
    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_cache_get_angles(self, input_func, input2_func, exp_equal_sun, exp_num_zarr, tmpdir):
        """Test get_angles when caching is enabled."""
        from satpy.modifiers.angles import (
            STATIC_EARTH_INERTIAL_DATETIME,
            _get_sensor_angles_from_sat_pos,
            _get_valid_lonlats,
            get_angles,
        )

        # Patch methods
        data = input_func()
        additional_cache = exp_num_zarr > 4

        # Compute angles
        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol, \
                satpy.config.set(cache_lonlats=True, cache_sensor_angles=True, cache_dir=str(tmpdir)):
            res = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in res)

            # call again, should be cached
            new_data = input2_func(data)
            res2 = get_angles(new_data)
            assert all(isinstance(x, xr.DataArray) for x in res2)
            res, res2 = da.compute(res, res2)
            for r1, r2 in zip(res[:2], res2[:2]):
                if additional_cache:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)
                else:
                    np.testing.assert_allclose(r1, r2)

            for r1, r2 in zip(res[2:], res2[2:]):
                if exp_equal_sun:
                    np.testing.assert_allclose(r1, r2)
                else:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)

            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == exp_num_zarr  # two for lon/lat, one for sata, one for satz

            _get_sensor_angles_from_sat_pos.cache_clear()
            _get_valid_lonlats.cache_clear()
            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == 0

>       assert gol.call_count == data.data.blocks.size * (int(additional_cache) + 1)
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:577: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((2, 2, 1), (2, 2, 1))
______________________ TestAngleGeneration.test_cache_get_angles[_get_stacked_angle_test_data-<lambda>-True-4] ______________________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fd735e50>
input_func = <function _get_stacked_angle_test_data at 0x7fd22687b310>
input2_func = <function TestAngleGeneration.<lambda> at 0x7fd22687b5e0>, exp_equal_sun = True, exp_num_zarr = 4
tmpdir = local('/tmp/pytest-of-antonio/pytest-1/test_cache_get_angles__get_sta0')

    @pytest.mark.parametrize(
        ("input2_func", "exp_equal_sun", "exp_num_zarr"),
        [
            (lambda x: x, True, 4),
            (_similar_sat_pos_datetime, False, 4),
            (_diff_sat_pos_datetime, False, 6),
        ]
    )
    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_cache_get_angles(self, input_func, input2_func, exp_equal_sun, exp_num_zarr, tmpdir):
        """Test get_angles when caching is enabled."""
        from satpy.modifiers.angles import (
            STATIC_EARTH_INERTIAL_DATETIME,
            _get_sensor_angles_from_sat_pos,
            _get_valid_lonlats,
            get_angles,
        )

        # Patch methods
        data = input_func()
        additional_cache = exp_num_zarr > 4

        # Compute angles
        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol, \
                satpy.config.set(cache_lonlats=True, cache_sensor_angles=True, cache_dir=str(tmpdir)):
            res = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in res)

            # call again, should be cached
            new_data = input2_func(data)
            res2 = get_angles(new_data)
            assert all(isinstance(x, xr.DataArray) for x in res2)
            res, res2 = da.compute(res, res2)
            for r1, r2 in zip(res[:2], res2[:2]):
                if additional_cache:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)
                else:
                    np.testing.assert_allclose(r1, r2)

            for r1, r2 in zip(res[2:], res2[2:]):
                if exp_equal_sun:
                    np.testing.assert_allclose(r1, r2)
                else:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)

            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == exp_num_zarr  # two for lon/lat, one for sata, one for satz

            _get_sensor_angles_from_sat_pos.cache_clear()
            _get_valid_lonlats.cache_clear()
            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == 0

>       assert gol.call_count == data.data.blocks.size * (int(additional_cache) + 1)
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:577: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((5,), (2, 2, 1))
_____________ TestAngleGeneration.test_cache_get_angles[_get_stacked_angle_test_data-_similar_sat_pos_datetime-False-4] _____________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fbc9e670>
input_func = <function _get_stacked_angle_test_data at 0x7fd22687b310>
input2_func = <function _similar_sat_pos_datetime at 0x7fd22687b3a0>, exp_equal_sun = False, exp_num_zarr = 4
tmpdir = local('/tmp/pytest-of-antonio/pytest-1/test_cache_get_angles__get_sta1')

    @pytest.mark.parametrize(
        ("input2_func", "exp_equal_sun", "exp_num_zarr"),
        [
            (lambda x: x, True, 4),
            (_similar_sat_pos_datetime, False, 4),
            (_diff_sat_pos_datetime, False, 6),
        ]
    )
    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_cache_get_angles(self, input_func, input2_func, exp_equal_sun, exp_num_zarr, tmpdir):
        """Test get_angles when caching is enabled."""
        from satpy.modifiers.angles import (
            STATIC_EARTH_INERTIAL_DATETIME,
            _get_sensor_angles_from_sat_pos,
            _get_valid_lonlats,
            get_angles,
        )

        # Patch methods
        data = input_func()
        additional_cache = exp_num_zarr > 4

        # Compute angles
        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol, \
                satpy.config.set(cache_lonlats=True, cache_sensor_angles=True, cache_dir=str(tmpdir)):
            res = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in res)

            # call again, should be cached
            new_data = input2_func(data)
            res2 = get_angles(new_data)
            assert all(isinstance(x, xr.DataArray) for x in res2)
            res, res2 = da.compute(res, res2)
            for r1, r2 in zip(res[:2], res2[:2]):
                if additional_cache:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)
                else:
                    np.testing.assert_allclose(r1, r2)

            for r1, r2 in zip(res[2:], res2[2:]):
                if exp_equal_sun:
                    np.testing.assert_allclose(r1, r2)
                else:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)

            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == exp_num_zarr  # two for lon/lat, one for sata, one for satz

            _get_sensor_angles_from_sat_pos.cache_clear()
            _get_valid_lonlats.cache_clear()
            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == 0

>       assert gol.call_count == data.data.blocks.size * (int(additional_cache) + 1)
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:577: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((5,), (2, 2, 1))
______________ TestAngleGeneration.test_cache_get_angles[_get_stacked_angle_test_data-_diff_sat_pos_datetime-False-6] _______________

self = <satpy.tests.test_modifiers.TestAngleGeneration object at 0x7fd1fbad2c70>
input_func = <function _get_stacked_angle_test_data at 0x7fd22687b310>
input2_func = <function _diff_sat_pos_datetime at 0x7fd22687b430>, exp_equal_sun = False, exp_num_zarr = 6
tmpdir = local('/tmp/pytest-of-antonio/pytest-1/test_cache_get_angles__get_sta2')

    @pytest.mark.parametrize(
        ("input2_func", "exp_equal_sun", "exp_num_zarr"),
        [
            (lambda x: x, True, 4),
            (_similar_sat_pos_datetime, False, 4),
            (_diff_sat_pos_datetime, False, 6),
        ]
    )
    @pytest.mark.parametrize("input_func", [_get_angle_test_data, _get_stacked_angle_test_data])
    def test_cache_get_angles(self, input_func, input2_func, exp_equal_sun, exp_num_zarr, tmpdir):
        """Test get_angles when caching is enabled."""
        from satpy.modifiers.angles import (
            STATIC_EARTH_INERTIAL_DATETIME,
            _get_sensor_angles_from_sat_pos,
            _get_valid_lonlats,
            get_angles,
        )

        # Patch methods
        data = input_func()
        additional_cache = exp_num_zarr > 4

        # Compute angles
        from pyorbital.orbital import get_observer_look
        with mock.patch("satpy.modifiers.angles.get_observer_look", wraps=get_observer_look) as gol, \
                satpy.config.set(cache_lonlats=True, cache_sensor_angles=True, cache_dir=str(tmpdir)):
            res = get_angles(data)
            assert all(isinstance(x, xr.DataArray) for x in res)

            # call again, should be cached
            new_data = input2_func(data)
            res2 = get_angles(new_data)
            assert all(isinstance(x, xr.DataArray) for x in res2)
            res, res2 = da.compute(res, res2)
            for r1, r2 in zip(res[:2], res2[:2]):
                if additional_cache:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)
                else:
                    np.testing.assert_allclose(r1, r2)

            for r1, r2 in zip(res[2:], res2[2:]):
                if exp_equal_sun:
                    np.testing.assert_allclose(r1, r2)
                else:
                    pytest.raises(AssertionError, np.testing.assert_allclose, r1, r2)

            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == exp_num_zarr  # two for lon/lat, one for sata, one for satz

            _get_sensor_angles_from_sat_pos.cache_clear()
            _get_valid_lonlats.cache_clear()
            zarr_dirs = glob(str(tmpdir / "*.zarr"))
            assert len(zarr_dirs) == 0

>       assert gol.call_count == data.data.blocks.size * (int(additional_cache) + 1)
E       AttributeError: 'IndexCallable' object has no attribute 'size'

satpy/tests/test_modifiers.py:577: AttributeError
------------------------------------------------------- Captured stdout call --------------------------------------------------------
((5,), (2, 2, 1))
========================================================= warnings summary ==========================================================
/usr/lib/python3/dist-packages/imageio/plugins/ffmpeg.py:1059
  /usr/lib/python3/dist-packages/imageio/plugins/ffmpeg.py:1059: DeprecationWarning: invalid escape sequence \.
    matches = re.findall(" ([0-9]+\.?[0-9]*) (tbr|fps)", line)

/usr/lib/python3/dist-packages/pyproj/crs/crs.py:543: 1 warning
satpy/tests/test_modifiers.py: 16 warnings
  /usr/lib/python3/dist-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()

satpy/tests/reader_tests/test_mviri_l1b_fiduceo_nc.py:541
  /home/antonio/projects/forks/satpy/satpy/tests/reader_tests/test_mviri_l1b_fiduceo_nc.py:541: PytestUnknownMarkWarning: Unknown pytest.mark.file_handler_data - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
    @pytest.mark.file_handler_data(mask_bad_quality=False)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
====================================================== short test summary info ======================================================
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_get_angles[_get_angle_test_data] - AttributeError: 'IndexCallable'...
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_get_angles[_get_stacked_angle_test_data] - AttributeError: 'IndexC...
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_cache_get_angles[_get_angle_test_data-<lambda>-True-4] - Attribute...
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_cache_get_angles[_get_angle_test_data-_similar_sat_pos_datetime-False-4]
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_cache_get_angles[_get_angle_test_data-_diff_sat_pos_datetime-False-6]
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_cache_get_angles[_get_stacked_angle_test_data-<lambda>-True-4] - A...
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_cache_get_angles[_get_stacked_angle_test_data-_similar_sat_pos_datetime-False-4]
FAILED satpy/tests/test_modifiers.py::TestAngleGeneration::test_cache_get_angles[_get_stacked_angle_test_data-_diff_sat_pos_datetime-False-6]
==================================== 8 failed, 16 passed, 1391 deselected, 19 warnings in 21.06s ====================================

Environment Info:

Writers

/usr/lib/python3/dist-packages/pyninjotiff/tifffile.py:154: UserWarning: failed to import the optional _tifffile C extension module. Loading of some compressed images will be slow. Tifffile.c can be obtained at http://www.lfd.uci.edu/~gohlke/ warnings.warn( awips_tiled: ok cf: ok geotiff: ok mitiff: ok ninjogeotiff: ok ninjotiff: ok simple_image: ok

Extras

cartopy: ok geoviews: No module named 'geoviews'

djhoese commented 2 years ago

Thanks for the bug report. What version of dask, xarray, and numpy?

avalentino commented 2 years ago
djhoese commented 2 years ago

It looks like this was fixed/updated a couple months ago in dask (https://github.com/dask/dask/commit/b1c388351a659ae9edb03cd8350ac249c68859de). Any chance you could use a newer version of dask?

avalentino commented 2 years ago

Thanks @djhoese , it seems that the issue you mention has been fixed in dask 2021.11.0.

I cannot switch to the new version right now because I'm constrained to use only debian packages, but I'm confident that an updated dask version will be available pretty soon in Debian as well

Please feel free to close..