ProjectPythia / pythia-foundations

Jupyterbook source for the Foundations collection
http://foundations.projectpythia.org
Apache License 2.0
59 stars 42 forks source link

Cartopy tutorial `stock_img()` error #413

Closed r-ford closed 11 months ago

r-ford commented 11 months ago

The line in the Cartopy tutorial that adds an image to the map using stock_img() is raising an error. As a result, the rest of the notebook is not running.

It also seems like our nightly build isn't catching it.

brian-rose commented 11 months ago

Good catch. The reason our nightly build is not catching this is because we haven't yet set the same flag that we use in cookbooks for this:

sphinx:
  config:
    nb_execution_raise_on_error: true # raise exception in build if there are notebook errors (this flag is ignored if building on binder)

in the _config.yml file.

r-ford commented 11 months ago

We're using the latest version of Cartopy (v0.21.1), but I was able to run the code fine on the UAlbany JupyterHub, which uses v0.21.0. Both versions produce the error locally when I use the Foundations environment, so I'm not sure what's going on.

brian-rose commented 11 months ago

Is this a bug in Cartopy 0.21.1? I don't see it reported in cartopy issues on github

brian-rose commented 11 months ago

I tried a minimal example:

import matplotlib.pyplot as plt
from cartopy import crs as ccrs
fig = plt.figure(figsize=(11, 8.5))
ax = plt.subplot(1, 1, 1, projection=ccrs.Mollweide(central_longitude=0))
ax.stock_img()

This code actually ran fine under Cartopy 0.21.1 on my laptop, in an environment created with

mamba create --name test-cartopy cartopy scipy jupyter

The same code did reproduce the error using Cartropy 0.21.0 in an environment created like this:

mamba create --name test-cartopy-older cartopy=0.21.0 scipy jupyter -c conda-forge 

So whatever the problem is, it's not specific to Cartopy 0.21.1

brian-rose commented 11 months ago

And it looks like I misread your comment above. We already know the problem is not specific to Cartopy 0.21.1.

The problem is sensitive to something in the Cartopy dependencies.

brian-rose commented 11 months ago

I found some differences depending on whether I install using -c conda-forge or not. Two different environments, both with the latest Cartopy.

This environment works for the above test code:

# packages in environment at /Users/br546577/miniconda3/envs/test-cartopy-noforge:
#
# Name                    Version                   Build  Channel
aiofiles                  22.1.0          py311hca03da5_0
aiosqlite                 0.18.0          py311hca03da5_0
anyio                     3.5.0           py311hca03da5_0
appdirs                   1.4.4              pyhd3eb1b0_0
appnope                   0.1.2           py311hca03da5_1001
argon2-cffi               21.3.0             pyhd3eb1b0_0
argon2-cffi-bindings      21.2.0          py311h80987f9_0
asttokens                 2.0.5              pyhd3eb1b0_0
attrs                     22.1.0          py311hca03da5_0
babel                     2.11.0          py311hca03da5_0
backcall                  0.2.0              pyhd3eb1b0_0
beautifulsoup4            4.12.2          py311hca03da5_0
blas                      1.0                    openblas
bleach                    4.1.0              pyhd3eb1b0_0
brotli                    1.0.9                h1a28f6b_7
brotli-bin                1.0.9                h1a28f6b_7
brotlipy                  0.7.0           py311h80987f9_1002
bzip2                     1.0.8                h620ffc9_4
c-ares                    1.19.0               h80987f9_0
ca-certificates           2023.05.30           hca03da5_0
cartopy                   0.21.1          py311hf94de1b_0
certifi                   2023.5.7        py311hca03da5_0
cffi                      1.15.1          py311h80987f9_3
charset-normalizer        2.0.4              pyhd3eb1b0_0
comm                      0.1.2           py311hca03da5_0
contourpy                 1.0.5           py311h48ca7d4_0
cryptography              39.0.1          py311h834c97f_2
cycler                    0.11.0             pyhd3eb1b0_0
debugpy                   1.5.1           py311h313beb8_0
decorator                 5.1.1              pyhd3eb1b0_0
defusedxml                0.7.1              pyhd3eb1b0_0
entrypoints               0.4             py311hca03da5_0
executing                 0.8.3              pyhd3eb1b0_0
fonttools                 4.25.0             pyhd3eb1b0_0
freetype                  2.12.1               h1192e45_0
geos                      3.9.1                hc377ac9_1
gettext                   0.21.0               h13f89a0_1
giflib                    5.2.1                h80987f9_3
glib                      2.69.1               h514c7bf_2
gst-plugins-base          1.14.1               h313beb8_1
gstreamer                 1.14.1               h80987f9_1
icu                       68.1                 hc377ac9_0
idna                      3.4             py311hca03da5_0
ipykernel                 6.19.2          py311h37496c9_0
ipython                   8.12.0          py311hca03da5_0
ipython_genutils          0.2.0              pyhd3eb1b0_1
ipywidgets                8.0.4           py311hca03da5_0
jedi                      0.18.1          py311hca03da5_1
jinja2                    3.1.2           py311hca03da5_0
jpeg                      9e                   h80987f9_1
json5                     0.9.6              pyhd3eb1b0_0
jsonschema                4.17.3          py311hca03da5_0
jupyter                   1.0.0           py311hca03da5_8
jupyter_client            8.1.0           py311hca03da5_0
jupyter_console           6.6.3           py311hca03da5_0
jupyter_core              5.3.0           py311hca03da5_0
jupyter_events            0.6.3           py311hca03da5_0
jupyter_server            2.5.0           py311hca03da5_0
jupyter_server_fileid     0.9.0           py311hca03da5_0
jupyter_server_terminals  0.4.4           py311hca03da5_1
jupyter_server_ydoc       0.8.0           py311hca03da5_1
jupyter_ydoc              0.2.4           py311hca03da5_0
jupyterlab                3.6.3           py311hca03da5_0
jupyterlab_pygments       0.1.2                      py_0
jupyterlab_server         2.22.0          py311hca03da5_0
jupyterlab_widgets        3.0.5           py311hca03da5_0
kiwisolver                1.4.4           py311h313beb8_0
krb5                      1.20.1               hf3e1bf2_1
lcms2                     2.12                 hba8e193_0
lerc                      3.0                  hc377ac9_0
libbrotlicommon           1.0.9                h1a28f6b_7
libbrotlidec              1.0.9                h1a28f6b_7
libbrotlienc              1.0.9                h1a28f6b_7
libclang                  12.0.0          default_hc321e17_4
libcurl                   8.1.1                h3e2b118_1
libcxx                    14.0.6               h848a8c0_0
libdeflate                1.17                 h80987f9_0
libedit                   3.1.20221030         h80987f9_0
libev                     4.33                 h1a28f6b_1
libffi                    3.4.4                hca03da5_0
libgfortran               5.0.0           11_3_0_hca03da5_28
libgfortran5              11.3.0              h009349e_28
libiconv                  1.16                 h1a28f6b_2
libllvm12                 12.0.0               h12f7ac0_4
libnghttp2                1.52.0               h62f6fdd_1
libopenblas               0.3.21               h269037a_0
libpng                    1.6.39               h80987f9_0
libpq                     12.15                h02f6b3c_1
libsodium                 1.0.18               h1a28f6b_0
libssh2                   1.10.0               h02f6b3c_2
libtiff                   4.5.0                h313beb8_2
libwebp                   1.2.4                ha3663a8_1
libwebp-base              1.2.4                h80987f9_1
libxml2                   2.10.3               h372ba2a_0
libxslt                   1.1.37               habca612_0
llvm-openmp               14.0.6               hc6e5704_0
lxml                      4.9.2           py311h80987f9_0
lz4-c                     1.9.4                h313beb8_0
markupsafe                2.1.1           py311h80987f9_0
matplotlib-base           3.7.1           py311h7aedaa7_1
matplotlib-inline         0.1.6           py311hca03da5_0
mistune                   0.8.4           py311h80987f9_1000
munkres                   1.1.4                      py_0
nbclassic                 0.5.5           py311hca03da5_0
nbclient                  0.5.13          py311hca03da5_0
nbconvert                 6.5.4           py311hca03da5_0
nbformat                  5.7.0           py311hca03da5_0
ncurses                   6.4                  h313beb8_0
nest-asyncio              1.5.6           py311hca03da5_0
notebook                  6.5.4           py311hca03da5_0
notebook-shim             0.2.2           py311hca03da5_0
nspr                      4.35                 h313beb8_0
nss                       3.89.1               h313beb8_0
numpy                     1.25.0          py311he598dae_0
numpy-base                1.25.0          py311hfbfe69c_0
openssl                   3.0.9                h1a28f6b_0
packaging                 23.0            py311hca03da5_0
pandocfilters             1.5.0              pyhd3eb1b0_0
parso                     0.8.3              pyhd3eb1b0_0
pcre                      8.45                 hc377ac9_0
pexpect                   4.8.0              pyhd3eb1b0_3
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    9.4.0           py311h313beb8_0
pip                       23.1.2          py311hca03da5_0
platformdirs              2.5.2           py311hca03da5_0
ply                       3.11            py311hca03da5_0
pooch                     1.4.0              pyhd3eb1b0_0
proj                      8.2.1                hb8d25fd_0
prometheus_client         0.14.1          py311hca03da5_0
prompt-toolkit            3.0.36          py311hca03da5_0
prompt_toolkit            3.0.36               hd3eb1b0_0
psutil                    5.9.0           py311h80987f9_0
ptyprocess                0.7.0              pyhd3eb1b0_2
pure_eval                 0.2.2              pyhd3eb1b0_0
pycparser                 2.21               pyhd3eb1b0_0
pygments                  2.15.1          py311hca03da5_1
pyopenssl                 23.0.0          py311hca03da5_0
pyparsing                 3.0.9           py311hca03da5_0
pyproj                    3.4.1           py311h0c26271_0
pyqt                      5.15.7          py311h313beb8_0
pyqt5-sip                 12.11.0         py311h313beb8_0
pyrsistent                0.18.0          py311h80987f9_0
pyshp                     2.1.3              pyhd3eb1b0_0
pysocks                   1.7.1           py311hca03da5_0
python                    3.11.4               hb885b13_0
python-dateutil           2.8.2              pyhd3eb1b0_0
python-fastjsonschema     2.16.2          py311hca03da5_0
python-json-logger        2.0.7           py311hca03da5_0
pytz                      2022.7          py311hca03da5_0
pyyaml                    6.0             py311h80987f9_1
pyzmq                     25.1.0          py311h313beb8_0
qt-main                   5.15.2               ha2d02b5_7
qt-webengine              5.15.9               h2903aaf_4
qtconsole                 5.4.2           py311hca03da5_0
qtpy                      2.2.0           py311hca03da5_0
qtwebkit                  5.212                h19f419d_5
readline                  8.2                  h1a28f6b_0
requests                  2.29.0          py311hca03da5_0
rfc3339-validator         0.1.4           py311hca03da5_0
rfc3986-validator         0.1.1           py311hca03da5_0
scipy                     1.10.1          py311hc76d9b0_1
send2trash                1.8.0              pyhd3eb1b0_1
setuptools                67.8.0          py311hca03da5_0
shapely                   2.0.1           py311h3713c0e_0
sip                       6.6.2           py311h313beb8_0
six                       1.16.0             pyhd3eb1b0_1
sniffio                   1.2.0           py311hca03da5_1
soupsieve                 2.4             py311hca03da5_0
sqlite                    3.41.2               h80987f9_0
stack_data                0.2.0              pyhd3eb1b0_0
terminado                 0.17.1          py311hca03da5_0
tinycss2                  1.2.1           py311hca03da5_0
tk                        8.6.12               hb8d0fd4_0
toml                      0.10.2             pyhd3eb1b0_0
tornado                   6.2             py311h80987f9_0
traitlets                 5.7.1           py311hca03da5_0
typing-extensions         4.6.3           py311hca03da5_0
typing_extensions         4.6.3           py311hca03da5_0
tzdata                    2023c                h04d1e81_0
urllib3                   1.26.16         py311hca03da5_0
wcwidth                   0.2.5              pyhd3eb1b0_0
webencodings              0.5.1           py311hca03da5_1
websocket-client          0.58.0          py311hca03da5_4
wheel                     0.38.4          py311hca03da5_0
widgetsnbextension        4.0.5           py311hca03da5_0
xz                        5.4.2                h80987f9_0
y-py                      0.5.9           py311ha6e5c4f_0
yaml                      0.2.5                h1a28f6b_0
ypy-websocket             0.8.2           py311hca03da5_0
zeromq                    4.3.4                hc377ac9_0
zlib                      1.2.13               h5a0b063_0
zstd                      1.5.5                hd90d995_0

whereas this environment doesn't work for the above test code:

# packages in environment at /Users/br546577/miniconda3/envs/test-cartopy:
#
# Name                    Version                   Build  Channel
anyio                     3.7.1              pyhd8ed1ab_0    conda-forge
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py311he2be06e_3    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.5              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
bleach                    6.0.0              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h1a8c8d9_9    conda-forge
brotli-bin                1.0.9                h1a8c8d9_9    conda-forge
brotli-python             1.0.9           py311ha397e9f_9    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
c-ares                    1.19.1               hb547adb_0    conda-forge
ca-certificates           2023.5.7             hf0a4a13_0    conda-forge
cartopy                   0.21.1          py311hbf64cf6_1    conda-forge
certifi                   2023.5.7           pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py311hae827db_3    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
comm                      0.1.3              pyhd8ed1ab_0    conda-forge
contourpy                 1.1.0           py311he4fd1f5_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
debugpy                   1.6.7           py311ha397e9f_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.1.2              pyhd8ed1ab_0    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
flit-core                 3.9.0              pyhd8ed1ab_0    conda-forge
fonttools                 4.40.0          py311heffc1b2_0    conda-forge
freetype                  2.12.1               hd633e50_1    conda-forge
geos                      3.11.2               hb7217d7_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib_metadata        6.8.0                hd8ed1ab_0    conda-forge
importlib_resources       6.0.0              pyhd8ed1ab_1    conda-forge
ipykernel                 6.24.0             pyh5fb750a_0    conda-forge
ipython                   8.14.0             pyhd1c38e8_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.0.7              pyhd8ed1ab_0    conda-forge
jedi                      0.18.2             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
jsonschema                4.18.1             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.6.1           pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0           py311h267d04e_8    conda-forge
jupyter_client            8.3.0              pyhd8ed1ab_0    conda-forge
jupyter_console           6.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.3.1           py311h267d04e_0    conda-forge
jupyter_events            0.6.3              pyhd8ed1ab_0    conda-forge
jupyter_server            2.7.0              pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.4.4              pyhd8ed1ab_1    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.8              pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.4           py311hd6ee22a_1    conda-forge
krb5                      1.20.1               h69eda48_0    conda-forge
lcms2                     2.15                 hd835a16_1    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libblas                   3.9.0           17_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h1a8c8d9_9    conda-forge
libbrotlidec              1.0.9                h1a8c8d9_9    conda-forge
libbrotlienc              1.0.9                h1a8c8d9_9    conda-forge
libcblas                  3.9.0           17_osxarm64_openblas    conda-forge
libcurl                   8.1.2                h912dcd9_0    conda-forge
libcxx                    16.0.6               h4653b0c_0    conda-forge
libdeflate                1.18                 h1a8c8d9_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h642e427_1    conda-forge
libexpat                  2.5.0                hb7217d7_1    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           12_2_0_hd922786_31    conda-forge
libgfortran5              12.2.0              h0eea778_31    conda-forge
libjpeg-turbo             2.1.5.1              h1a8c8d9_0    conda-forge
liblapack                 3.9.0           17_osxarm64_openblas    conda-forge
libnghttp2                1.52.0               hae82a92_0    conda-forge
libopenblas               0.3.23          openmp_hc731615_0    conda-forge
libpng                    1.6.39               h76d750c_0    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.42.0               hb31c410_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libtiff                   4.5.1                h23a1a89_0    conda-forge
libwebp-base              1.3.1                hb547adb_0    conda-forge
libxcb                    1.15                 hf346824_0    conda-forge
libzlib                   1.2.13               h53f4e23_5    conda-forge
llvm-openmp               16.0.6               h1c12783_0    conda-forge
markupsafe                2.1.3           py311heffc1b2_0    conda-forge
matplotlib-base           3.7.2           py311h3bc9839_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mistune                   3.0.0              pyhd8ed1ab_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nbclassic                 1.0.0              pyhb4ecaf3_1    conda-forge
nbclient                  0.8.0              pyhd8ed1ab_0    conda-forge
nbconvert                 7.6.0              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.6.0              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.6.0              pyhd8ed1ab_0    conda-forge
nbformat                  5.9.1              pyhd8ed1ab_0    conda-forge
ncurses                   6.4                  h7ea286d_0    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
notebook                  6.5.4              pyha770c72_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
numpy                     1.25.1          py311hb8f3215_0    conda-forge
openjpeg                  2.5.0                hbc2ba62_2    conda-forge
openssl                   3.1.1                h53f4e23_1    conda-forge
overrides                 7.3.1              pyhd8ed1ab_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pandoc                    3.1.3                hce30654_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.0.0          py311h095fde6_0    conda-forge
pip                       23.1.2             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
platformdirs              3.8.1              pyhd8ed1ab_0    conda-forge
pooch                     1.7.0              pyha770c72_3    conda-forge
proj                      9.2.1                h8fdea58_0    conda-forge
prometheus_client         0.17.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.39             pyha770c72_0    conda-forge
prompt_toolkit            3.0.39               hd8ed1ab_0    conda-forge
psutil                    5.9.5           py311he2be06e_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.15.1             pyhd8ed1ab_0    conda-forge
pyobjc-core               9.2             py311hb702dc4_0    conda-forge
pyobjc-framework-cocoa    9.2             py311hb702dc4_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyproj                    3.6.0           py311h280d66e_1    conda-forge
pyshp                     2.3.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.11.4          h47c9636_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.17.1             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python_abi                3.11                    3_cp311    conda-forge
pyyaml                    6.0             py311he2be06e_5    conda-forge
pyzmq                     25.1.0          py311hb1af645_0    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
referencing               0.29.1             pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rpds-py                   0.8.10          py311h0563b04_0    conda-forge
scipy                     1.11.1          py311h93d07a4_0    conda-forge
send2trash                1.8.2              pyhd1c38e8_0    conda-forge
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
shapely                   2.0.1           py311h7f8cfc4_1    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
sqlite                    3.42.0               h203b68d_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
terminado                 0.17.1             pyhd1c38e8_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
tornado                   6.3.2           py311heffc1b2_0    conda-forge
traitlets                 5.9.0              pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.3              pyhd8ed1ab_1    conda-forge
wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.6.1              pyhd8ed1ab_0    conda-forge
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.8              pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hb547adb_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.4                hbdafb3b_1    conda-forge
zipp                      3.16.0             pyhd8ed1ab_1    conda-forge
zstd                      1.5.2                h4f39d0f_7    conda-forge

The two environments have different scipy versions. Since the error is originating within a scipy routine, this is likely related to the problem.

brian-rose commented 11 months ago

Pinning to scipy 1.10.1 seems to resolve the problem:

mamba create --name test-cartopy-oldscipy cartopy scipy=1.10.1 jupyter -c conda-forge

results in an environment in which the test code runs normally.

brian-rose commented 11 months ago

As a "for now" solution, we can pin the scipy version in the Foundations environment.

We'll need to report this as a Cartopy issue.

brian-rose commented 11 months ago

I opened it here: https://github.com/SciTools/cartopy/issues/2212

But this turned out to be a duplicate already reported in https://github.com/SciTools/cartopy/issues/2199

There is a PR open to fix it, so most likely after the next Cartopy release (maybe 0.21.2?) we'll be able to remove the version pin from our environment file

brian-rose commented 11 months ago

Fixed in #414, closing now.