Package Details: python-cartopy 0.21.1-1

Git Clone URL: https://aur.archlinux.org/python-cartopy.git (read-only, click to copy)
Package Base: python-cartopy
Description: A cartographic Python library with Matplotlib support for visualisation
Upstream URL: https://scitools.org.uk/cartopy/
Licenses: LGPL3
Submitter: gauteh
Maintainer: gauteh (bcb)
Last Packager: bcb
Votes: 10
Popularity: 0.29
First Submitted: 2015-11-16 16:00 (UTC)
Last Updated: 2022-12-25 11:12 (UTC)

Latest Comments

1 2 3 Next › Last »

Nestor_013 commented on 2023-09-08 08:07 (UTC)

For those of you who are missing this package, I've made a crude but working PKGBUILD for version 0.22

https://gist.github.com/nestor013/b83456893bd7c7789c2790638027929a#file-pkgbuild

ith140 commented on 2023-07-07 12:21 (UTC) (edited on 2023-07-07 12:28 (UTC) by ith140)

This package seems to be missing a dependency on python-pyshp. I also get an error message similar to the ones that @carlosal1015 got (15 failed tests instead of 6). I'm not sure I like the idea of skipping the failed tests to get this package installed.


========================================================== FAILURES ==========================================================
_____________________________________________________ TestCRS.test_epsg ______________________________________________________

self = <cartopy.tests.test_crs.TestCRS object at 0x7ff933b79e90>

    def test_epsg(self):
        uk = ccrs.epsg(27700)
        assert uk.epsg_code == 27700
>       assert_almost_equal(uk.x_limits, (-104009.357, 688806.007), decimal=3)

cartopy/tests/test_crs.py:92: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff930adbba0>, (-104728.76470291585, 688806.0073395604), (-104009.357, 688806.007))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 3 decimals', 'precision': 3, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 3 decimals
E           
E           Mismatched elements: 1 / 2 (50%)
E           Max absolute difference: 719.40770292
E           Max relative difference: 0.00691676
E            x: array([-104728.765,  688806.007])
E            y: array([-104009.357,  688806.007])

/usr/lib/python3.11/contextlib.py:81: AssertionError
_____________________________________________ TestEquidistantConic.test_default ______________________________________________

self = <cartopy.tests.crs.test_equidistant_conic.TestEquidistantConic object at 0x7ff9322c33d0>

    def test_default(self):
        eqdc = ccrs.EquidistantConic()
        other_args = {'ellps=WGS84', 'lon_0=0.0', 'lat_0=0.0', 'x_0=0.0',
                      'y_0=0.0', 'lat_1=20.0', 'lat_2=50.0'}
        check_proj_params('eqdc', eqdc, other_args)

>       assert_almost_equal(np.array(eqdc.x_limits),
                            (-22784919.35600352, 22784919.35600352),
                            decimal=7)

cartopy/tests/crs/test_equidistant_conic.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff9306abec0>, array([-22784919.35599817,  22784919.35599817]), (-22784919.35600352, 22784919.35600352))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 7 decimals', 'precision': 7, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 7 decimals
E           
E           Mismatched elements: 2 / 2 (100%)
E           Max absolute difference: 5.34579158e-06
E           Max relative difference: 2.34619728e-13
E            x: array([-22784919.3559982,  22784919.3559982])
E            y: array([-22784919.3560035,  22784919.3560035])

/usr/lib/python3.11/contextlib.py:81: AssertionError
_________________________________________ TestEquidistantConic.test_eccentric_globe __________________________________________

self = <cartopy.tests.crs.test_equidistant_conic.TestEquidistantConic object at 0x7ff9322c1bd0>

    def test_eccentric_globe(self):
        globe = ccrs.Globe(semimajor_axis=1000, semiminor_axis=500,
                           ellipse=None)
        eqdc = ccrs.EquidistantConic(globe=globe)
        other_args = {'a=1000', 'b=500', 'lon_0=0.0', 'lat_0=0.0', 'x_0=0.0',
                      'y_0=0.0', 'lat_1=20.0', 'lat_2=50.0'}
        check_proj_params('eqdc', eqdc, other_args)

>       assert_almost_equal(np.array(eqdc.x_limits),
                            (-3016.869847713461, 3016.869847713461),
                            decimal=7)

cartopy/tests/crs/test_equidistant_conic.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff9306cc7c0>, array([-2960.1009481,  2960.1009481]), (-3016.869847713461, 3016.869847713461))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 7 decimals', 'precision': 7, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 7 decimals
E           
E           Mismatched elements: 2 / 2 (100%)
E           Max absolute difference: 56.76889961
E           Max relative difference: 0.01881715
E            x: array([-2960.1009481,  2960.1009481])
E            y: array([-3016.8698477,  3016.8698477])

/usr/lib/python3.11/contextlib.py:81: AssertionError
_______________________________________ TestEquidistantConic.test_ellipsoid_transform ________________________________________

self = <cartopy.tests.crs.test_equidistant_conic.TestEquidistantConic object at 0x7ff932411bd0>

    def test_ellipsoid_transform(self):
        # USGS Professional Paper 1395, pp 299--300
        globe = ccrs.Globe(semimajor_axis=6378206.4,
                           flattening=1 - np.sqrt(1 - 0.00676866),
                           ellipse=None)
        lat_1 = 29.5
        lat_2 = 45.5
        eqdc = ccrs.EquidistantConic(central_latitude=23.0,
                                     central_longitude=-96.0,
                                     standard_parallels=(lat_1, lat_2),
                                     globe=globe)
        geodetic = eqdc.as_geodetic()

        other_args = {'a=6378206.4', 'f=0.003390076308689371', 'lon_0=-96.0',
                      'lat_0=23.0', 'x_0=0.0', 'y_0=0.0', 'lat_1=29.5',
                      'lat_2=45.5'}
        check_proj_params('eqdc', eqdc, other_args)

>       assert_almost_equal(np.array(eqdc.x_limits),
                            (-22421870.719894886, 22421870.719894886),
                            decimal=7)

cartopy/tests/crs/test_equidistant_conic.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff9306cede0>, array([-22421870.71988974,  22421870.71988976]), (-22421870.719894886, 22421870.719894886))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 7 decimals', 'precision': 7, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 7 decimals
E           
E           Mismatched elements: 2 / 2 (100%)
E           Max absolute difference: 5.14835119e-06
E           Max relative difference: 2.29612919e-13
E            x: array([-22421870.7198897,  22421870.7198898])
E            y: array([-22421870.7198949,  22421870.7198949])

/usr/lib/python3.11/contextlib.py:81: AssertionError
_________________________________ Test_LambertConformal_standard_parallels.test_single_spole _________________________________

self = <cartopy.tests.crs.test_lambert_conformal.Test_LambertConformal_standard_parallels object at 0x7ff9322a8290>

    def test_single_spole(self):
        s_pole_crs = ccrs.LambertConformal(standard_parallels=[-1.])
>       assert_array_almost_equal(s_pole_crs.x_limits,
                                  (-19939660, 19939660),
                                  decimal=0)

cartopy/tests/crs/test_lambert_conformal.py:71: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff9309698a0>, (-19840440.929965686, 19840440.92996561), (-19939660, 19939660))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 0 decimals', 'precision': 0, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 0 decimals
E           
E           Mismatched elements: 2 / 2 (100%)
E           Max absolute difference: 99219.07003439
E           Max relative difference: 0.00497597
E            x: array([-19840441.,  19840441.])
E            y: array([-19939660,  19939660])

/usr/lib/python3.11/contextlib.py:81: AssertionError
_________________________________ Test_LambertConformal_standard_parallels.test_single_npole _________________________________

self = <cartopy.tests.crs.test_lambert_conformal.Test_LambertConformal_standard_parallels object at 0x7ff9322a9590>

    def test_single_npole(self):
        n_pole_crs = ccrs.LambertConformal(standard_parallels=[1.])
>       assert_array_almost_equal(n_pole_crs.x_limits,
                                  (-20130569, 20130569),
                                  decimal=0)

cartopy/tests/crs/test_lambert_conformal.py:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff9306ff600>, (-20222156.420383506, 20222156.420383424), (-20130569, 20130569))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 0 decimals', 'precision': 0, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 0 decimals
E           
E           Mismatched elements: 2 / 2 (100%)
E           Max absolute difference: 91587.42038351
E           Max relative difference: 0.00454967
E            x: array([-20222156.,  20222156.])
E            y: array([-20130569,  20130569])

/usr/lib/python3.11/contextlib.py:81: AssertionError
____________________________________________ TestSinusoidal.test_eccentric_globe _____________________________________________

self = <cartopy.tests.crs.test_sinusoidal.TestSinusoidal object at 0x7ff93241d8d0>

    def test_eccentric_globe(self):
        globe = ccrs.Globe(semimajor_axis=1000, semiminor_axis=500,
                           ellipse=None)
        crs = ccrs.Sinusoidal(globe=globe)
        other_args = {'a=1000', 'b=500', 'lon_0=0.0', 'x_0=0.0', 'y_0=0.0'}
        check_proj_params('sinu', crs, other_args)

        assert_almost_equal(np.array(crs.x_limits),
                            [-3141.59, 3141.59], decimal=2)
>       assert_almost_equal(np.array(crs.y_limits),
                            [-1216.60, 1216.60], decimal=2)

cartopy/tests/crs/test_sinusoidal.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
/usr/lib/python3.11/contextlib.py:81: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x7ff9307f3420>, array([-1211.05573766,  1211.05573766]), [-1216.6, 1216.6])
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 2 decimals', 'precision': 2, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 2 decimals
E           
E           Mismatched elements: 2 / 2 (100%)
E           Max absolute difference: 5.54426234
E           Max relative difference: 0.00455718
E            x: array([-1211.06,  1211.06])
E            y: array([-1216.6,  1216.6])

/usr/lib/python3.11/contextlib.py:81: AssertionError
____________________________________________________ test_geoaxes_subplot ____________________________________________________

    def test_geoaxes_subplot():
        ax = plt.subplot(1, 1, 1, projection=ccrs.PlateCarree())
>       assert str(ax.__class__) == "<class 'cartopy.mpl.geoaxes.GeoAxesSubplot'>"
E       assert "<class 'cart...xes.GeoAxes'>" == "<class 'cart...AxesSubplot'>"
E         - <class 'cartopy.mpl.geoaxes.GeoAxesSubplot'>
E         ?                                    -------
E         + <class 'cartopy.mpl.geoaxes.GeoAxes'>

cartopy/tests/mpl/test_axes.py:122: AssertionError
______________________________________________________ test_global_map _______________________________________________________

args = (), kwargs = {}

    def wrapper(*args, **kwargs):
>       store.return_value[test_name] = obj(*args, **kwargs)

/usr/lib/python3.11/site-packages/pytest_mpl/plugin.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/tests/mpl/test_examples.py:24: in test_global_map
    ax.stock_img()
cartopy/mpl/geoaxes.py:1019: in stock_img
    return self.imshow(imread(fname), origin='upper',
cartopy/mpl/geoaxes.py:318: in wrapper
    return func(self, *args, **kwargs)
cartopy/mpl/geoaxes.py:1331: in imshow
    img, extent = warp_array(img,
cartopy/img_transform.py:192: in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
________________________________________________________ test_imshow _________________________________________________________

args = (), kwargs = {}

    def wrapper(*args, **kwargs):
>       store.return_value[test_name] = obj(*args, **kwargs)

/usr/lib/python3.11/site-packages/pytest_mpl/plugin.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/tests/mpl/test_images.py:111: in test_imshow
    ax.imshow(img, transform=source_proj,
cartopy/mpl/geoaxes.py:318: in wrapper
    return func(self, *args, **kwargs)
cartopy/mpl/geoaxes.py:1331: in imshow
    img, extent = warp_array(img,
cartopy/img_transform.py:192: in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
___________________________________________________ test_imshow_rgba_alpha ___________________________________________________

    def test_imshow_rgba_alpha():
        # test that alpha channel from RGBA is not skipped
        dy, dx = (3, 4)

        ax = plt.axes(projection=ccrs.Orthographic(-120, 45))

        # Create RGBA Image with random data and linspace alpha
        RGBA = np.linspace(0, 255 * 31, dx * dy * 4,
                           dtype=np.uint8).reshape((dy, dx, 4))

        alpha = np.array([0, 85, 170, 255])
        RGBA[:, :, 3] = alpha

>       img = ax.imshow(RGBA, transform=ccrs.PlateCarree())

cartopy/tests/mpl/test_images.py:169: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/mpl/geoaxes.py:318: in wrapper
    return func(self, *args, **kwargs)
cartopy/mpl/geoaxes.py:1331: in imshow
    img, extent = warp_array(img,
cartopy/img_transform.py:192: in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
_______________________________________________________ test_stock_img _______________________________________________________

args = (), kwargs = {}

    def wrapper(*args, **kwargs):
>       store.return_value[test_name] = obj(*args, **kwargs)

/usr/lib/python3.11/site-packages/pytest_mpl/plugin.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/tests/mpl/test_images.py:188: in test_stock_img
    ax.stock_img()
cartopy/mpl/geoaxes.py:1019: in stock_img
    return self.imshow(imread(fname), origin='upper',
cartopy/mpl/geoaxes.py:318: in wrapper
    return func(self, *args, **kwargs)
cartopy/mpl/geoaxes.py:1331: in imshow
    img, extent = warp_array(img,
cartopy/img_transform.py:192: in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
_______________________________________________________ test_pil_Image _______________________________________________________

args = (), kwargs = {}

    def wrapper(*args, **kwargs):
>       store.return_value[test_name] = obj(*args, **kwargs)

/usr/lib/python3.11/site-packages/pytest_mpl/plugin.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/tests/mpl/test_images.py:197: in test_pil_Image
    ax.imshow(img, transform=source_proj,
cartopy/mpl/geoaxes.py:318: in wrapper
    return func(self, *args, **kwargs)
cartopy/mpl/geoaxes.py:1331: in imshow
    img, extent = warp_array(img,
cartopy/img_transform.py:192: in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
____________________________________________________ test_background_img _____________________________________________________

args = (), kwargs = {}

    def wrapper(*args, **kwargs):
>       store.return_value[test_name] = obj(*args, **kwargs)

/usr/lib/python3.11/site-packages/pytest_mpl/plugin.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/tests/mpl/test_images.py:205: in test_background_img
    ax.background_img(name='ne_shaded', resolution='low')
cartopy/mpl/geoaxes.py:1103: in background_img
    return self.imshow(img, origin='upper',
cartopy/mpl/geoaxes.py:318: in wrapper
    return func(self, *args, **kwargs)
cartopy/mpl/geoaxes.py:1331: in imshow
    img, extent = warp_array(img,
cartopy/img_transform.py:192: in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
_____________________________________________________ test_regrid_image ______________________________________________________

args = (), kwargs = {}

    def wrapper(*args, **kwargs):
>       store.return_value[test_name] = obj(*args, **kwargs)

/usr/lib/python3.11/site-packages/pytest_mpl/plugin.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cartopy/tests/mpl/test_img_transform.py:104: in test_regrid_image
    new_array = im_trans.regrid(data, source_x, source_y, source_proj,
cartopy/img_transform.py:278: in regrid
    _, indices = kdtree.query(target_xyz, k=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: 'x' must be finite, check for nan or inf values

_ckdtree.pyx:795: ValueError
====================================================== warnings summary ======================================================
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_coastline.py: 41 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_line_string.py: 28 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_axes.py: 18 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_caching.py: 145 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_contour.py: 22 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_crs.py: 406 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_features.py: 1 warning
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_images.py: 151 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_mpl_integration.py: 3082 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_plots.py: 1 warning
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_set_extent.py: 6 warnings
  /home/ihoffman/.cache/yay/python-cartopy/src/Cartopy-0.21.1/build/lib.linux-x86_64-cpython-311/cartopy/crs.py:814: DeprecationWarning: The 'geom_factory' function is deprecated in Shapely 2.0, and will be removed in a future version
    return cartopy.trace.project_linear(geometry, src_crs, self)

build/lib.linux-x86_64-cpython-311/cartopy/tests/test_crs.py: 58 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_crs_transform_vectors.py: 24 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_polygon.py: 16 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_vector_transform.py: 12 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_albers_equal_area.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_azimuthal_equidistant.py: 8 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_eckert.py: 8 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_equidistant_conic.py: 2 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_geostationary.py: 2 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_gnomonic.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py: 12 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_miller.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_mollweide.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_orthographic.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_robinson.py: 10 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_stereographic.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_transverse_mercator.py: 40 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/crs/test_utm.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_contour.py: 8 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_images.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_mpl_integration.py: 92 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_shapely_to_mpl.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_ticker.py: 186 warnings
  /usr/lib/python3.11/site-packages/pyproj/transformer.py:812: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    return self._transformer._transform_point(

build/lib.linux-x86_64-cpython-311/cartopy/tests/test_crs.py::TestCRS::test_osgb[True]
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_crs.py::TestCRS::test_osgb[False]
  /home/ihoffman/.cache/yay/python-cartopy/src/Cartopy-0.21.1/build/lib.linux-x86_64-cpython-311/cartopy/tests/test_crs.py:61: UserWarning: uk_os_OSTN15_NTv2_OSGBtoETRS.tif is unavailable; testing OSGB at reduced precision
    warnings.warn(f'{grid_name} is unavailable; '

build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_geodesic.py::test_geometry_length_multilinestring
  /usr/lib/python3.11/site-packages/pyproj/geod.py:404: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    return self._inv_point(

build/lib.linux-x86_64-cpython-311/cartopy/tests/test_img_tiles.py: 7 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_linear_ring.py: 10 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/test_polygon.py: 42 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_axes.py: 8 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_caching.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_contour.py: 16 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_crs.py: 3 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_feature_artist.py: 4 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_features.py: 26 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_images.py: 5 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_mpl_integration.py: 1583 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_nightshade.py: 2 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_pseudo_color.py: 17 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_set_extent.py: 2 warnings
build/lib.linux-x86_64-cpython-311/cartopy/tests/mpl/test_shapely_to_mpl.py: 33 warnings
  /home/ihoffman/.cache/yay/python-cartopy/src/Cartopy-0.21.1/build/lib.linux-x86_64-cpython-311/cartopy/crs.py:827: DeprecationWarning: The 'geom_factory' function is deprecated in Shapely 2.0, and will be removed in a future version
    multi_line_string = cartopy.trace.project_linear(linear_ring,

build/lib.linux-x86_64-cpython-311/cartopy/tests/test_shapereader.py::TestLakes::test_geometry
  /home/ihoffman/.cache/yay/python-cartopy/src/Cartopy-0.21.1/build/lib.linux-x86_64-cpython-311/cartopy/tests/test_shapereader.py:32: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
    assert lake_geometry.type == 'Polygon'

build/lib.linux-x86_64-cpython-311/cartopy/tests/test_shapereader.py::TestRivers::test_geometry
  /home/ihoffman/.cache/yay/python-cartopy/src/Cartopy-0.21.1/build/lib.linux-x86_64-cpython-311/cartopy/tests/test_shapereader.py:92: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
    assert geometry.type == 'LineString'

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================== short test summary info ===================================================
FAILED cartopy/tests/test_crs.py::TestCRS::test_epsg - AssertionError: 
FAILED cartopy/tests/crs/test_equidistant_conic.py::TestEquidistantConic::test_default - AssertionError: 
FAILED cartopy/tests/crs/test_equidistant_conic.py::TestEquidistantConic::test_eccentric_globe - AssertionError: 
FAILED cartopy/tests/crs/test_equidistant_conic.py::TestEquidistantConic::test_ellipsoid_transform - AssertionError: 
FAILED cartopy/tests/crs/test_lambert_conformal.py::Test_LambertConformal_standard_parallels::test_single_spole - AssertionError: 
FAILED cartopy/tests/crs/test_lambert_conformal.py::Test_LambertConformal_standard_parallels::test_single_npole - AssertionError: 
FAILED cartopy/tests/crs/test_sinusoidal.py::TestSinusoidal::test_eccentric_globe - AssertionError: 
FAILED cartopy/tests/mpl/test_axes.py::test_geoaxes_subplot - assert "<class 'cart...xes.GeoAxes'>" == "<class 'cart...AxesSubplot'>"
FAILED cartopy/tests/mpl/test_examples.py::test_global_map - ValueError: 'x' must be finite, check for nan or inf values
FAILED cartopy/tests/mpl/test_images.py::test_imshow - ValueError: 'x' must be finite, check for nan or inf values
FAILED cartopy/tests/mpl/test_images.py::test_imshow_rgba_alpha - ValueError: 'x' must be finite, check for nan or inf values
FAILED cartopy/tests/mpl/test_images.py::test_stock_img - ValueError: 'x' must be finite, check for nan or inf values
FAILED cartopy/tests/mpl/test_images.py::test_pil_Image - ValueError: 'x' must be finite, check for nan or inf values
FAILED cartopy/tests/mpl/test_images.py::test_background_img - ValueError: 'x' must be finite, check for nan or inf values
FAILED cartopy/tests/mpl/test_img_transform.py::test_regrid_image - ValueError: 'x' must be finite, check for nan or inf values
============== 15 failed, 632 passed, 51 skipped, 68 deselected, 2 xfailed, 2 xpassed, 6189 warnings in 42.69s ===============
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-cartopy-exit status 4
 -> Failed to install the following packages. Manual intervention is required:

alhirzel commented on 2023-06-07 21:44 (UTC)

Same as well. I use yay so I had to install with yay --mflags --nocheck.

Divert commented on 2023-05-28 01:02 (UTC)

I have the same problem as @carlosal1015

carlosal1015 commented on 2023-05-20 17:05 (UTC)

Hi, I have the following message error

==================================================================== short test summary info ====================================================================
FAILED cartopy/tests/test_crs.py::TestCRS::test_epsg - AssertionError: 
FAILED cartopy/tests/crs/test_equidistant_conic.py::TestEquidistantConic::test_default - AssertionError: 
FAILED cartopy/tests/crs/test_equidistant_conic.py::TestEquidistantConic::test_eccentric_globe - AssertionError: 
FAILED cartopy/tests/crs/test_equidistant_conic.py::TestEquidistantConic::test_ellipsoid_transform - AssertionError: 
FAILED cartopy/tests/crs/test_sinusoidal.py::TestSinusoidal::test_eccentric_globe - AssertionError: 
FAILED cartopy/tests/mpl/test_axes.py::test_geoaxes_subplot - assert "<class 'cart...xes.GeoAxes'>" == "<class 'cart...AxesSubplot'>"
=========================== 6 failed, 642 passed, 50 skipped, 68 deselected, 2 xfailed, 2 xpassed, 5675 warnings in 67.16s (0:01:07) ============================
==> ERROR: A failure occurred in check().

oldherl commented on 2023-04-28 02:08 (UTC)

@Polly Try install python-pyarrow

Polly commented on 2023-01-02 17:07 (UTC) (edited on 2023-01-02 17:11 (UTC) by Polly)

@bcb Absolutely the right package to report. After building from AUR (without the checks) and upon import I get the following:

libpodofo.so.0.9.8: cannot open shared object file: No such file or directory libpodofo.so.0.9.8: cannot open shared object file: No such file or directory libarrow_dataset.so.1000: cannot open shared object file: No such file or directory libarrow_dataset.so.1000: cannot open shared object file: No such file or directory libarrow.so.1000: cannot open shared object file: No such file or directory libarrow.so.1000: cannot open shared object file: No such file or directory libpodofo.so.0.9.8: cannot open shared object file: No such file or directory libpodofo.so.0.9.8: cannot open shared object file: No such file or directory libarrow_dataset.so.1000: cannot open shared object file: No such file or directory libarrow_dataset.so.1000: cannot open shared object file: No such file or directory libarrow.so.1000: cannot open shared object file: No such file or directory libarrow.so.1000: cannot open shared object file: No such file or directory

My system is up to date as of today (2023/01/02).

bcb commented on 2022-09-16 09:50 (UTC)

Hi @user20159,

Sorry for the delay, I was out of town.

This is due to a recent change in the build directory setuptools uses, see https://github.com/pypa/setuptools/commit/1c23f5e1e4b18b50081cbabb2dea22bf345f5894

This should be fixed by the new package I have just pushed.

bcb commented on 2022-09-16 09:46 (UTC)

Hi @Polly,

Are you sure you reported this on the correct package? There is no mention of such libraries in the documentation, and using grep on the source doesn't find any imports of libraries named podofo or arrow. podofo seems to be a PDF manipulation library which isn't particularly relevant to cartopy, and arrow is a date/time library which cartopy doesn't seem to use.

user20159 commented on 2022-09-06 20:28 (UTC)

Hi everyone, thanks for packaging this! However, check() fails for me with:

line 41: cd: Cartopy-0.20.3/build/lib.linux-x86_64-3.10: No such file or directory

The correct name for the directory in my case is:

build/lib.linux-x86_64-cpython-310/

Am I the only one having this issue?