html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/6062#issuecomment-992878363,https://api.github.com/repos/pydata/xarray/issues/6062,992878363,IC_kwDOAMm_X847Lh8b,4666753,2021-12-13T20:38:37Z,2021-12-14T04:43:21Z,CONTRIBUTOR,"I have matplotlib installed.
Here's the output of `xr.show_versions()` (after rolling back to 0.19):
Output of xr.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:59:51)
[GCC 9.4.0]
python-bits: 64
OS: Linux
OS-release: 5.4.72-microsoft-standard-WSL2
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.1
libnetcdf: 4.8.1
xarray: 0.19.0
pandas: 1.3.4
numpy: 1.21.4
scipy: 1.7.3
netCDF4: 1.5.8
pydap: None
h5netcdf: None
h5py: 2.10.0
Nio: None
zarr: 2.10.3
cftime: 1.5.1
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.3.2
dask: 2021.11.2
distributed: 2021.11.2
matplotlib: 3.5.1
cartopy: None
seaborn: 0.11.2
numbagg: None
pint: None
setuptools: 59.4.0
pip: 21.3.1
conda: None
pytest: None
IPython: 7.30.1
sphinx: 4.3.1
By ""no display available"", I meant on a headless server (e.g. WSL2, compute node on slurm cluster).
Digging more into this, this is related to matplotlib/matplotlib#17396 (matplotlib >= 3.4):
- matplotlib tries to automatically select the plotting backend, especially whether or not there is a display to use.
- On Linux, matplotlib < 3.4, this was effectively done by checking if `DISPLAY` environment variable was set.
- For matplotlib >= 3.4, matplotlib/matplotlib#17396 added additional check to call `XOpenDisplay(NULL)` to see if X11 is able to connect to the `DISPLAY` environment variable.
- This was to fix instances where `DISPLAY` was set but no longer valid. A common example is on slurm (or some other cluster managers) opening a compute node which by default copies all environment variables, including DISPLAY, to a new node.
I experience hanging because my WSL2 setup sets DISPLAY to reference an X11 server that isn't always running. Since the X11 server is on Windows, the DISPLAY refers to a remote address. Apparently, X11 doesn't give up when it isn't able to connect to a remote X11 server, and, so it hangs on that command.
That is for matplotlib >= 3.4. For matplotlib = 3.3 (which is still less than a year old) and xarray=0.20, I get:
- (RedHat on cluster, selects TkAgg backend): is able to import, but fails to plot afterwards
- (WSL2, attempts to select QtAgg backend): fails import (and exits Python!) with message:
```
qt.qpa.plugin: Could not load the Qt platform plugin ""xcb"" in """" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the
application may fix this problem.
Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.
Aborted
```
This will become a little bit less of an issue when we set the minimum version of matplotlib to 3.4. However, I still think we should revert PR #5794 (PR #6064). It doesn't fix any bug. Before matplotlib >= 3.4, the common-knowledge I had previously seen from writing scripts with headless-use of matplotlib was that we shouldn't import `matplotlib.pyplot` until we needed it. This was consistent with the previous imports in the plotting functions. Reverting will make it so that errors related to how the plotting environment is set up only take place when users explicitly want to make plots, rather than for all imports of xarray, many of which do not involve any plotting whatsoever.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1076377174
https://github.com/pydata/xarray/pull/6064#issuecomment-990578151,https://api.github.com/repos/pydata/xarray/issues/6064,990578151,IC_kwDOAMm_X847CwXn,4666753,2021-12-10T03:27:19Z,2021-12-10T03:29:55Z,CONTRIBUTOR,"Wasn't sure what to do about the `import_xarray` benchmark. Right now, this is just directly reverting previous PR and as such removes it. Might be worth adding it back for benchmarking future PRs.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1076384122
https://github.com/pydata/xarray/issues/5883#issuecomment-949875448,https://api.github.com/repos/pydata/xarray/issues/5883,949875448,IC_kwDOAMm_X844nfL4,4666753,2021-10-22T18:37:06Z,2021-10-22T18:37:06Z,CONTRIBUTOR,"I see the issue now. Closing the issue, but in case anyone else is figuring this out:
- I initially had this problem with coordinate ""a"" (index over dimension). In retrospect, since it was a dimension index, it was not chunked. So parallel writes are not safe (since they are not to independent chunks).
- At some point, while constructing my MCVE, I swapped the chunking of ""x"". Right now, it is not chunked on a, but rather on b. So, parallel writes are not safe (since they are not to independent chunks).
- If I write `chunks=(1, None)` for the dummy value for `x`, the example no longer has errors.
In summary, main takeaways are:
- check that your chunking aligns with your parallel writes using regions.
- dimension coordinates cannot be chunked in zarr (to my knowledge, at least), and so, they do not support parallel writes. Write these either before or after the parallel writes.
Sorry for opening this issue that wasn't a real issue!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1033142897
https://github.com/pydata/xarray/pull/3752#issuecomment-582987048,https://api.github.com/repos/pydata/xarray/issues/3752,582987048,MDEyOklzc3VlQ29tbWVudDU4Mjk4NzA0OA==,4666753,2020-02-06T16:25:54Z,2020-02-06T16:25:54Z,CONTRIBUTOR,We have different test failures than last time. They appear to be happening in tests with time indexes this time. I suspect these failures are again unrelated to the pull request.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,559958918
https://github.com/pydata/xarray/pull/3752#issuecomment-582108728,https://api.github.com/repos/pydata/xarray/issues/3752,582108728,MDEyOklzc3VlQ29tbWVudDU4MjEwODcyOA==,4666753,2020-02-04T20:50:34Z,2020-02-04T20:50:34Z,CONTRIBUTOR,The 4 pytest failures per check are taking place in `tests/test_plot.py`. I suspect that these failures are unrelated to the pull request.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,559958918
https://github.com/pydata/xarray/pull/3752#issuecomment-582102600,https://api.github.com/repos/pydata/xarray/issues/3752,582102600,MDEyOklzc3VlQ29tbWVudDU4MjEwMjYwMA==,4666753,2020-02-04T20:34:55Z,2020-02-04T20:34:55Z,CONTRIBUTOR,"I added a simple test, but not sure it is correctly set up. I wasn't sure about how pytest fixtures worked, so I didn't know if I needed/how to set up a new fixture to test the bugfix.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,559958918