id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 664458864,MDU6SXNzdWU2NjQ0NTg4NjQ=,4257,local build of docs fails with OSError: [UT_PARSE] Failed to open UDUNITS-2 XML unit database,8833517,closed,0,,,9,2020-07-23T13:07:22Z,2023-07-27T14:00:06Z,2021-02-19T22:03:38Z,CONTRIBUTOR,,,," **What happened**: When trying to build the docs locally, the `make html` step fails with `UdunitsError: UT_PARSE` and `OSError: [UT_PARSE] Failed to open UDUNITS-2 XML unit database`. Searching online only results in a [single (unanswered) mention on the gitter channel](https://gitter.im/pydata/xarray?at=5d1ca56cdd5b167204e807dc) and a few results of errors on windows, but this is on Ubuntu 18.04 **What you expected to happen**: A succesful sphinx build of the xarray documentation **Minimal Complete Verifiable Example**: ```bash (xarray-docs) rijnsjvan@turbine:~/src/xarray/doc$ make html sphinx-build -b html -d _build/doctrees . _build/html Running Sphinx v3.1.2 python exec: /home/rijnsjvan/miniconda3/envs/xarray-docs/bin/python3.8 sys.path: ['/home/rijnsjvan/src/xarray', '/home/rijnsjvan/miniconda3/envs/xarray-docs/bin', '/home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python38.zip', '/home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8', '/home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/lib-dynload', '/home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages', '/home/rijnsjvan/src/xarray'] ```
conda environment: ```bash # packages in environment at /home/rijnsjvan/miniconda3/envs/xarray-docs: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 0_gnu conda-forge affine 2.3.0 py_0 conda-forge alabaster 0.7.12 py_0 conda-forge antlr-python-runtime 4.7.2 py38_1001 conda-forge asciitree 0.3.3 py_2 conda-forge attrs 19.3.0 py_0 conda-forge babel 2.8.0 py_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge bleach 3.1.5 pyh9f0ad1d_0 conda-forge bokeh 2.1.1 py38h32f6830_0 conda-forge boost-cpp 1.72.0 h8e57a91_0 conda-forge bottleneck 1.3.2 py38h8790de6_1 conda-forge brotlipy 0.7.0 py38h1e0a361_1000 conda-forge bzip2 1.0.8 h516909a_2 conda-forge ca-certificates 2020.6.20 hecda079_0 conda-forge cairo 1.16.0 hcf35c78_1003 conda-forge cartopy 0.18.0 py38h172510d_0 conda-forge certifi 2020.6.20 py38h32f6830_0 conda-forge cf-units 2.1.4 py38h8790de6_0 conda-forge cffi 1.14.0 py38hd463f26_0 conda-forge cfgrib 0.9.8.3 py_0 conda-forge cfitsio 3.470 h3eac812_5 conda-forge cftime 1.2.1 py38h8790de6_0 conda-forge chardet 3.0.4 py38h32f6830_1006 conda-forge click 7.1.2 pyh9f0ad1d_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.5.0 py_0 conda-forge cloudpickle 1.5.0 py_0 conda-forge cryptography 3.0 py38h766eaa4_0 conda-forge curl 7.69.1 h33f0ec9_0 conda-forge cycler 0.10.0 py_2 conda-forge cytoolz 0.10.1 py38h516909a_0 conda-forge dask 2.21.0 py_0 conda-forge dask-core 2.21.0 py_0 conda-forge decorator 4.4.2 py_0 conda-forge defusedxml 0.6.0 py_0 conda-forge distributed 2.21.0 py38h32f6830_0 conda-forge docutils 0.16 py38h32f6830_1 conda-forge eccodes 2.18.0 hf05d9b7_0 conda-forge entrypoints 0.3 py38h32f6830_1001 conda-forge expat 2.2.9 he1b5a44_2 conda-forge fasteners 0.14.1 py_3 conda-forge fontconfig 2.13.1 h86ecdb6_1001 conda-forge freetype 2.10.2 he06d7ca_0 conda-forge freexl 1.0.5 h516909a_1002 conda-forge fsspec 0.7.4 py_0 conda-forge gdal 3.0.4 py38h172510d_10 conda-forge geos 3.8.1 he1b5a44_0 conda-forge geotiff 1.6.0 h05acad5_0 conda-forge gettext 0.19.8.1 hc5be6a0_1002 conda-forge giflib 5.2.1 h516909a_2 conda-forge glib 2.65.0 h6f030ca_0 conda-forge h5netcdf 0.8.1 py_0 conda-forge h5py 2.10.0 nompi_py38hfb01d0b_104 conda-forge hdf4 4.2.13 hf30be14_1003 conda-forge hdf5 1.10.6 nompi_h3c11f04_100 conda-forge heapdict 1.0.1 py_0 conda-forge icu 64.2 he1b5a44_1 conda-forge idna 2.10 pyh9f0ad1d_0 conda-forge imagesize 1.2.0 py_0 conda-forge importlib-metadata 1.7.0 py38h32f6830_0 conda-forge importlib_metadata 1.7.0 0 conda-forge ipykernel 5.3.4 py38h23f93f0_0 conda-forge ipython 7.16.1 py38h23f93f0_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge iris 2.4.0 py38_0 conda-forge jasper 1.900.1 h07fcdf6_1006 conda-forge jedi 0.17.2 py38h32f6830_0 conda-forge jinja2 2.11.2 pyh9f0ad1d_0 conda-forge jpeg 9d h516909a_0 conda-forge json-c 0.13.1 hbfbb72e_1002 conda-forge jsonschema 3.2.0 py38h32f6830_1 conda-forge jupyter_client 6.1.6 py_0 conda-forge jupyter_core 4.6.3 py38h32f6830_1 conda-forge kealib 1.4.13 h33137a7_1 conda-forge kiwisolver 1.2.0 py38hbf85e49_0 conda-forge krb5 1.17.1 hfafb76e_1 conda-forge lcms2 2.11 hbd6801e_0 conda-forge ld_impl_linux-64 2.34 h53a641e_7 conda-forge libaec 1.0.4 he1b5a44_1 conda-forge libblas 3.8.0 17_openblas conda-forge libcblas 3.8.0 17_openblas conda-forge libcurl 7.69.1 hf7181ac_0 conda-forge libdap4 3.20.6 h1d1bd15_0 conda-forge libedit 3.1.20191231 h46ee950_1 conda-forge libffi 3.2.1 he1b5a44_1007 conda-forge libgcc-ng 9.2.0 h24d8f2e_2 conda-forge libgdal 3.0.4 he6a97d6_10 conda-forge libgfortran-ng 7.5.0 hdf63c60_6 conda-forge libgomp 9.2.0 h24d8f2e_2 conda-forge libiconv 1.15 h516909a_1006 conda-forge libkml 1.3.0 hb574062_1011 conda-forge liblapack 3.8.0 17_openblas conda-forge libllvm9 9.0.1 he513fc3_1 conda-forge libnetcdf 4.7.4 nompi_h84807e1_104 conda-forge libopenblas 0.3.10 pthreads_hb3c22a3_3 conda-forge libpng 1.6.37 hed695b0_1 conda-forge libpq 12.3 h5513abc_0 conda-forge libsodium 1.0.17 h516909a_0 conda-forge libspatialite 4.3.0a h2482549_1038 conda-forge libssh2 1.8.2 h22169c7_2 conda-forge libstdcxx-ng 9.2.0 hdf63c60_2 conda-forge libtiff 4.1.0 hc7e4089_6 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libwebp-base 1.1.0 h516909a_3 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxml2 2.9.10 hee79883_0 conda-forge llvmlite 0.33.0 py38h4f45e52_1 conda-forge locket 0.2.0 py_2 conda-forge lz4-c 1.9.2 he1b5a44_1 conda-forge markupsafe 1.1.1 py38h1e0a361_1 conda-forge matplotlib-base 3.3.0 py38h91b0d89_1 conda-forge mistune 0.8.4 py38h1e0a361_1001 conda-forge monotonic 1.5 py_0 conda-forge msgpack-python 1.0.0 py38hbf85e49_1 conda-forge nbconvert 5.6.1 py38h32f6830_1 conda-forge nbformat 5.0.7 py_0 conda-forge nbsphinx 0.7.1 pyh9f0ad1d_0 conda-forge ncurses 6.2 he1b5a44_1 conda-forge netcdf4 1.5.4 nompi_py38hfd55d45_100 conda-forge numba 0.50.1 py38hcb8c335_1 conda-forge numcodecs 0.6.4 py38he1b5a44_0 conda-forge numpy 1.19.0 py38h8854b6b_0 conda-forge olefile 0.46 py_0 conda-forge openjpeg 2.3.1 h981e76c_3 conda-forge openssl 1.1.1g h516909a_0 conda-forge owslib 0.20.0 py_0 conda-forge packaging 20.4 pyh9f0ad1d_0 conda-forge pandas 1.0.5 py38hcb8c335_0 conda-forge pandoc 2.10 h14c3975_0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.7.0 pyh9f0ad1d_0 conda-forge partd 1.1.0 py_0 conda-forge patsy 0.5.1 py_0 conda-forge pcre 8.44 he1b5a44_0 conda-forge pexpect 4.8.0 py38h32f6830_1 conda-forge pickleshare 0.7.5 py38h32f6830_1001 conda-forge pillow 7.2.0 py38h9776b28_1 conda-forge pip 20.1.1 py_1 conda-forge pixman 0.38.0 h516909a_1003 conda-forge poppler 0.87.0 h4190859_1 conda-forge poppler-data 0.4.9 1 conda-forge postgresql 12.3 h8573dbc_0 conda-forge proj 7.0.0 h966b41f_4 conda-forge prompt-toolkit 3.0.5 py_1 conda-forge psutil 5.7.2 py38h1e0a361_0 conda-forge pthread-stubs 0.4 h14c3975_1001 conda-forge ptyprocess 0.6.0 py_1001 conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pyepsg 0.4.0 py_0 conda-forge pygments 2.6.1 py_0 conda-forge pyke 1.1.1 py38h32f6830_1002 conda-forge pyopenssl 19.1.0 py_1 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyproj 2.6.1.post1 py38h7521cb9_0 conda-forge pyrsistent 0.16.0 py38h1e0a361_0 conda-forge pyshp 2.1.0 py_0 conda-forge pysocks 1.7.1 py38h32f6830_1 conda-forge python 3.8.5 cpython_h4d41432_0 conda-forge python-dateutil 2.8.1 py_0 conda-forge python_abi 3.8 1_cp38 conda-forge pytz 2020.1 pyh9f0ad1d_0 conda-forge pyyaml 5.3.1 py38h1e0a361_0 conda-forge pyzmq 19.0.1 py38ha71036d_0 conda-forge rasterio 1.1.5 py38h033e0f6_0 conda-forge readline 8.0 he28a2e2_2 conda-forge requests 2.24.0 pyh9f0ad1d_0 conda-forge scipy 1.5.1 py38h18bccfc_0 conda-forge seaborn 0.10.1 1 conda-forge seaborn-base 0.10.1 py_1 conda-forge setuptools 49.2.0 py38h32f6830_0 conda-forge shapely 1.7.0 py38hd168ffb_3 conda-forge six 1.15.0 pyh9f0ad1d_0 conda-forge snowballstemmer 2.0.0 py_0 conda-forge snuggs 1.4.7 py_0 conda-forge sortedcontainers 2.2.2 pyh9f0ad1d_0 conda-forge sphinx 3.1.2 py_0 conda-forge sphinx_rtd_theme 0.5.0 pyh9f0ad1d_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 1.0.3 py_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.4 py_0 conda-forge sqlite 3.32.3 hcee41ef_1 conda-forge statsmodels 0.11.1 py38h1e0a361_2 conda-forge tbb 2020.1 hc9558a2_0 conda-forge tblib 1.6.0 py_0 conda-forge testpath 0.4.4 py_0 conda-forge tiledb 1.7.7 h8efa9f0_3 conda-forge tk 8.6.10 hed695b0_0 conda-forge toolz 0.10.0 py_0 conda-forge tornado 6.0.4 py38h1e0a361_1 conda-forge traitlets 4.3.3 py38h32f6830_1 conda-forge typing_extensions 3.7.4.2 py_0 conda-forge tzcode 2020a h516909a_0 conda-forge udunits2 2.2.27.6 h4e0c4b3_1001 conda-forge urllib3 1.25.10 py_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_0 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.34.2 py_1 conda-forge xarray 0.16.1.dev6+g0b706a42 dev_0 xerces-c 3.2.2 h8412b87_1004 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.9 h516909a_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.5 h516909a_1 conda-forge yaml 0.2.5 h516909a_0 conda-forge zarr 2.4.0 py_0 conda-forge zeromq 4.3.2 he1b5a44_2 conda-forge zict 2.0.0 py_0 conda-forge zipp 3.1.0 py_0 conda-forge zlib 1.2.11 h516909a_1006 conda-forge zstd 1.4.5 h6597ccf_1 conda-forge xarray: 0.16.1.dev6+g0b706a42, /home/rijnsjvan/src/xarray/xarray/__init__.py ```
```bash [autosummary] generating autosummary for: README.rst, api-hidden.rst, api.rst, combining.rst, computation.rst, contributing.rst, dask.rst, data-structures.rst, examples.rst, examples/ERA5-GRIB-example.ipynb, ..., plotting.rst, quick-overview.rst, related-projects.rst, reshaping.rst, roadmap.rst, terminology.rst, time-series.rst, weather-climate.rst, whats-new.rst, why-xarray.rst [autosummary] generating autosummary for: /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.T.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.all.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.any.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.append.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.argsort.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.array.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.asi8.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.asof.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.asof_locs.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.CFTimeIndex.astype.rst, ..., /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.signbit.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.sin.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.sinh.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.sqrt.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.square.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.tan.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.tanh.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.ufuncs.trunc.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.where.rst, /home/rijnsjvan/src/xarray/doc/generated/xarray.zeros_like.rst loading intersphinx inventory from https://docs.python.org/3/objects.inv... loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv... loading intersphinx inventory from https://scitools.org.uk/iris/docs/latest/objects.inv... loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv... loading intersphinx inventory from https://docs.scipy.org/doc/scipy/reference/objects.inv... loading intersphinx inventory from https://numba.pydata.org/numba-doc/latest/objects.inv... loading intersphinx inventory from https://matplotlib.org/objects.inv... loading intersphinx inventory from https://docs.dask.org/en/latest/objects.inv... loading intersphinx inventory from https://unidata.github.io/cftime/objects.inv... building [mo]: targets for 0 po files that are out of date building [html]: targets for 37 source files that are out of date updating environment: [new config] 1156 added, 0 changed, 0 removed reading sources... [ 99%] io >>>------------------------------------------------------------------------- Exception in /home/rijnsjvan/src/xarray/doc/io.rst at block ending on line 516 Specify :okexcept: as an option in the ipython:: block to suppress this message --------------------------------------------------------------------------- UdunitsError Traceback (most recent call last) ~/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/cf_units/__init__.py in 187 try: --> 188 _ud_system = _ud.read_xml() 189 except _ud.UdunitsError: cf_units/_udunits2.pyx in cf_units._udunits2.read_xml() cf_units/_udunits2.pyx in cf_units._udunits2.wrap_system() cf_units/_udunits2.pyx in cf_units._udunits2._raise_error() UdunitsError: UT_PARSE During handling of the above exception, another exception occurred: UdunitsError Traceback (most recent call last) ~/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/cf_units/__init__.py in 194 try: --> 195 _ud_system = _ud.read_xml(_alt_xml_path.encode()) 196 except _ud.UdunitsError as e: cf_units/_udunits2.pyx in cf_units._udunits2.read_xml() cf_units/_udunits2.pyx in cf_units._udunits2.wrap_system() cf_units/_udunits2.pyx in cf_units._udunits2._raise_error() UdunitsError: UT_PARSE During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) in ----> 1 cube = da.to_iris() ~/src/xarray/xarray/core/dataarray.py in to_iris(self) 2570 from ..convert import to_iris 2571 -> 2572 return to_iris(self) 2573 2574 @classmethod ~/src/xarray/xarray/convert.py in to_iris(dataarray) 176 """""" 177 # Iris not a hard dependency --> 178 import iris 179 from iris.fileformats.netcdf import parse_cell_methods 180 ~/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/iris/__init__.py in 108 109 import iris.config --> 110 import iris.cube 111 import iris._constraints 112 from iris._deprecation import IrisDeprecation, warn_deprecated ~/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/iris/cube.py in 51 import numpy.ma as ma 52 ---> 53 from iris._cube_coord_common import CFVariableMixin 54 import iris._concatenate 55 import iris._constraints ~/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/iris/_cube_coord_common.py in 25 import string 26 ---> 27 import cf_units 28 29 import iris.std_names ~/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/cf_units/__init__.py in 196 except _ud.UdunitsError as e: 197 error_msg = ': ""%s""' % e.error_msg() if e.errnum else '' --> 198 raise OSError( 199 '[%s] Failed to open UDUNITS-2 XML unit database%s' 200 % (e.status_msg(), error_msg)) OSError: [UT_PARSE] Failed to open UDUNITS-2 XML unit database <<<------------------------------------------------------------------------- Exception occurred: File ""/home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/IPython/sphinxext/ipython_directive.py"", line 570, in process_input raise RuntimeError('Non Expected exception in `{}` line {}'.format(filename, lineno)) RuntimeError: Non Expected exception in `/home/rijnsjvan/src/xarray/doc/io.rst` line 516 The full traceback has been saved in /tmp/sphinx-err-8dbrbi71.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! Makefile:57: recipe for target 'html' failed make: *** [html] Error 2 ``` **Anything else we need to know?**: **Environment**: Fresh install of miniconda on Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-111-generic x86_64)
freshly created environment: ```bash rijnsjvan@turbine:~/src/xarray$ conda env create -f ci/requirements/doc.yml Collecting package metadata (repodata.json): done Solving environment: done Downloading and Extracting Packages [... a whole bunch of downloads ...] Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate xarray-docs # # To deactivate an active environment, use # # $ conda deactivate rijnsjvan@turbine:~/src/xarray$ conda activate xarray-docs (xarray-docs) rijnsjvan@turbine:~/src/xarray$ pip install -e . Obtaining file:///home/rijnsjvan/src/xarray Requirement already satisfied: numpy>=1.15 in /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages (from xarray==0.16.1.dev6+g0b706a42) (1.19.0) Requirement already satisfied: pandas>=0.25 in /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages (from xarray==0.16.1.dev6+g0b706a42) (1.0.5) Requirement already satisfied: setuptools>=41.2 in /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages (from xarray==0.16.1.dev6+g0b706a42) (49.2.0.post20200712) Requirement already satisfied: pytz>=2017.2 in /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages (from pandas>=0.25->xarray==0.16.1.dev6+g0b706a42) (2020.1) Requirement already satisfied: python-dateutil>=2.6.1 in /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages (from pandas>=0.25->xarray==0.16.1.dev6+g0b706a42) (2.8.1) Requirement already satisfied: six>=1.5 in /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages (from python-dateutil>=2.6.1->pandas>=0.25->xarray==0.16.1.dev6+g0b706a42) (1.15.0) Installing collected packages: xarray Attempting uninstall: xarray Found existing installation: xarray 0.16.0 Uninstalling xarray-0.16.0: Successfully uninstalled xarray-0.16.0 Running setup.py develop for xarray Successfully installed xarray ```
Output of xr.show_versions() /home/rijnsjvan/miniconda3/envs/xarray-docs/lib/python3.8/site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first. warnings.warn( INSTALLED VERSIONS ------------------ commit: None python: 3.8.5 | packaged by conda-forge | (default, Jul 22 2020, 17:31:50) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 4.15.0-111-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.6 libnetcdf: 4.7.4 xarray: 0.16.1.dev6+g0b706a42 pandas: 1.0.5 numpy: 1.19.0 scipy: 1.5.1 netCDF4: 1.5.4 pydap: None h5netcdf: 0.8.1 h5py: 2.10.0 Nio: None zarr: 2.4.0 cftime: 1.2.1 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.5 cfgrib: 0.9.8.3 iris: 2.4.0 bottleneck: 1.3.2 dask: 2.21.0 distributed: 2.21.0 matplotlib: 3.3.0 cartopy: 0.18.0 seaborn: 0.10.1 numbagg: None pint: None setuptools: 49.2.0.post20200712 pip: 20.1.1 conda: None pytest: None IPython: 7.16.1 sphinx: 3.1.2
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4257/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 929569643,MDExOlB1bGxSZXF1ZXN0Njc3NDAwNjQ0,5528,Undeprecate dict argument for coords in DataArray (#5527),8833517,closed,0,,,2,2021-06-24T20:02:04Z,2023-02-17T22:40:35Z,2021-07-04T16:21:52Z,CONTRIBUTOR,,0,pydata/xarray/pulls/5528,"Discussed this in #3820, would have been possible a year ago... Better late than never 😅 - [x] Closes #5527 - [x] Tests added - [x] Passes `pre-commit run --all-files` - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5528/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 929567025,MDU6SXNzdWU5Mjk1NjcwMjU=,5527,Undeprecate passing dictionary as coords for DataArray,8833517,closed,0,,,0,2021-06-24T19:58:01Z,2021-07-04T16:21:52Z,2021-07-04T16:21:52Z,CONTRIBUTOR,,,,"Since Python 3.7, key order is fixed by the language specification, making the original reason for deprecation obsolete. See the prior discussion in #3820.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5527/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 675590448,MDExOlB1bGxSZXF1ZXN0NDY1MDc1OTgz,4327,DOC: fix typo argmin -> argmax in DataArray.argmax docstring,8833517,closed,0,,,1,2020-08-08T21:23:57Z,2020-08-08T21:56:17Z,2020-08-08T21:56:17Z,CONTRIBUTOR,,0,pydata/xarray/pulls/4327,"Just a small typo ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4327/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 663355647,MDExOlB1bGxSZXF1ZXN0NDU0Nzg1Mzkw,4245,Fix DataArray.copy documentation: remove confusing mention of 'dataset' (Gh3606),8833517,closed,0,,,3,2020-07-21T22:48:26Z,2020-08-05T09:40:49Z,2020-07-24T19:20:45Z,CONTRIBUTOR,,0,pydata/xarray/pulls/4245," - [x] Closes #3606 - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4245/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 664497733,MDExOlB1bGxSZXF1ZXN0NDU1NzI4NzM0,4258,"Removed skipna argument from count, any, all [GH755]",8833517,closed,0,,,4,2020-07-23T13:59:27Z,2020-07-24T17:38:23Z,2020-07-24T16:09:26Z,CONTRIBUTOR,,0,pydata/xarray/pulls/4258," - [x] Closes #755 - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` Could not confirm in the web-based documentation (see #4257), but manually confirmed to work: ```python >>> import xarray as xr >>> help(xr.DataArray.count) Help on function count in module xarray.core.common: count(self, dim=None, axis=None, **kwargs) Reduce this DataArray's data by applying `count` along some dimension(s). Parameters ---------- dim : str or sequence of str, optional Dimension(s) over which to apply `count`. axis : int or sequence of int, optional Axis(es) over which to apply `count`. Only one of the 'dim' and 'axis' arguments can be supplied. If neither are supplied, then `count` is calculated over axes. keep_attrs : bool, optional If True, the attributes (`attrs`) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes. **kwargs : dict Additional keyword arguments passed on to the appropriate array function for calculating `count` on this object's data. Returns ------- reduced : DataArray New DataArray object with `count` applied to its data and the indicated dimension(s) removed. ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4258/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 574097799,MDU6SXNzdWU1NzQwOTc3OTk=,3820,Documentation of DataArray does not warn that inferring dimension names is deprecated,8833517,closed,0,,,8,2020-03-02T16:37:01Z,2020-03-03T19:34:39Z,2020-03-03T00:38:05Z,CONTRIBUTOR,,,,"The [documentation](https://xarray.pydata.org/en/latest/generated/xarray.DataArray.html#xarray.DataArray.__init__) states: > **coords**... > ... > Additionally, it is possible to define a coord whose name does not match the dimension name, or a coord based on multiple dimensions, with one of the following notations: > - mapping {coord name: DataArray} > - mapping {coord name: Variable} > - mapping {coord name: (dimension name, array-like)} > - mapping {coord name: (tuple of dimension names, array-like)} > > **dims** (hashable or sequence of hashable, optional) – Name(s) of the data dimension(s). Must be either a hashable (only for 1D data) or a sequence of hashables with length equal to the number of dimensions. If this argument is omitted, dimension names are taken from coords (if possible) and otherwise default to ['dim_0', ... 'dim_n']. Which seems to be no longer the case. #### MCVE Code Sample ```python da = xr.DataArray(np.zeros((2, 2)), coords={'x': [1, 2], 'y': [1, 2]}) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in ----> 1 da = xr.DataArray(np.zeros((2, 2)), coords={'x': [1, 2], 'y': [1, 2]}) /scratch/local/lib/python3.8/site-packages/xarray/core/dataarray.py in __init__(self, data, coords, dims, name, attrs, encoding, indexes, fastpath) 366 data = _check_data_shape(data, coords, dims) 367 data = as_compatible_data(data) --> 368 coords, dims = _infer_coords_and_dims(data.shape, coords, dims) 369 variable = Variable(dims, data, attrs, encoding, fastpath=True) 370 /scratch/local/lib/python3.8/site-packages/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims) 105 if utils.is_dict_like(coords): 106 # deprecated in GH993, removed in GH1539 --> 107 raise ValueError( 108 ""inferring DataArray dimensions from "" 109 ""dictionary like ``coords`` is no longer "" ValueError: inferring DataArray dimensions from dictionary like ``coords`` is no longer supported. Use an explicit list of ``dims`` instead. ``` #### Expected Output An update of the documentation to correctly specify the current behavior. (I'll propose a PR later today) #### Problem Description A mismatch between API specification and it's behavior seems like a problem to me :) #### Output of ``xr.show_versions()``
`xr.show_versions()` INSTALLED VERSIONS ------------------ commit: None python: 3.8.1 (default, Feb 11 2020, 12:54:25) [GCC 5.4.0 20160609] python-bits: 64 OS: Linux OS-release: 4.15.0-88-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_IE.UTF-8 LOCALE: en_IE.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.3 xarray: 0.14.1 pandas: 0.25.3 numpy: 1.18.0 scipy: 1.4.1 netCDF4: 1.5.3 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.0.4.2 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 3.1.2 cartopy: None seaborn: None numbagg: None setuptools: 45.2.0 pip: 20.0.2 conda: None pytest: None IPython: 7.11.1 sphinx: 2.3.1
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3820/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 574307914,MDExOlB1bGxSZXF1ZXN0MzgyNjU1ODk3,3821,removed mention that 'dims' are inferred from 'coords'-dict when omit…,8833517,closed,0,,,2,2020-03-02T23:09:33Z,2020-03-03T00:38:05Z,2020-03-03T00:38:05Z,CONTRIBUTOR,,0,pydata/xarray/pulls/3821,"…ted in DataArray - [x] Closes #3820 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3821/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull