issues: 2037869483
This data as json
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2037869483 | I_kwDOAMm_X855d2ur | 8544 | Reading netcdf file with string coordinates makes IPython kernel crash (netcdf4 engine) | 36678697 | closed | 0 | 14 | 2023-12-12T14:26:42Z | 2024-01-04T21:49:34Z | 2023-12-22T09:29:45Z | NONE | What happened?When trying to open a netcdf file that has strings as coordinates it makes the notebook kernel crash. This only happens when The bug occurs in IPython, in Jupyter in the web browser and in VSCode notebooks at least. The bug can consistently be reproduced when reading the same file twice on the same cell, when running the cell twice. What did you expect to happen?It is expected for Minimal Complete Verifiable Example```Python %%import numpy as np import xarray as xr %%fpath = "test.nc" da = xr.DataArray( data=np.random.randn(3, 10), dims=["label", "values"], coords=dict( label=["a", "b", "c"], ), ) da.to_netcdf(fpath) %%engine = "h5netcdf"engine = "netcdf4" xr.open_dataarray(fpath, engine=engine) xr.open_dataarray(fpath, engine=engine) ``` MVCE confirmation
Relevant log outputIPython crashes with: Jupyter Notebook logs:
VSCode notebook Jupyter logs: ``` 15:23:03.501 [info] Restart requested ~/Desktop/bug_xarray_notebook/bug.ipynb 15:23:03.502 [info] Dispose Kernel process 2763594. 15:23:03.589 [info] Process Execution: ~/miniconda3/bin/python -c "import ipykernel; print(ipykernel.version); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.file)" 15:23:03.671 [info] Process Execution: ~/miniconda3/bin/python -m ipykernel_launcher --f=~/.local/share/jupyter/runtime/kernel-v2-2727807dzOm3m1LEA5V.json > cwd: ~/Desktop/bug_xarray_notebook 15:23:04.149 [warn] StdErr from Kernel Process [IPKernelApp] WARNING | Unknown error in handling startup files: 15:23:04.454 [info] Restarted bd04fd87-98e7-486d-a6c6-7308101edcdf 15:23:08.046 [info] Handle Execution of Cells 0 for ~/Desktop/bug_xarray_notebook/bug.ipynb 15:23:08.055 [info] Kernel acknowledged execution of cell 0 @ 1702390988054 15:23:08.412 [info] End cell 0 execution after 0.358s, completed @ 1702390988412, started @ 1702390988054 15:23:09.260 [info] Handle Execution of Cells 1 for ~/Desktop/bug_xarray_notebook/bug.ipynb 15:23:09.269 [info] Kernel acknowledged execution of cell 1 @ 1702390989268 15:23:09.305 [info] End cell 1 execution after 0.036s, completed @ 1702390989304, started @ 1702390989268 15:23:10.893 [info] Handle Execution of Cells 2 for ~/Desktop/bug_xarray_notebook/bug.ipynb 15:23:10.907 [info] Kernel acknowledged execution of cell 2 @ 1702390990907 15:23:10.971 [info] End cell 2 execution after 0.064s, completed @ 1702390990971, started @ 1702390990907 15:23:12.255 [info] Handle Execution of Cells 2 for ~/Desktop/bug_xarray_notebook/bug.ipynb 15:23:12.262 [info] Kernel acknowledged execution of cell 2 @ 1702390992262 15:23:12.504 [error] Disposing session as kernel process died ExitCode: undefined, Reason: [IPKernelApp] WARNING | Unknown error in handling startup files: 15:23:12.505 [info] Dispose Kernel process 2764104. 15:23:12.518 [info] End cell 2 execution after -1702390992.262s, completed @ undefined, started @ 1702390992262 ``` Anything else we need to know?No response Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.12.0 | packaged by conda-forge | (main, Oct 3 2023, 08:43:22) [GCC 12.3.0]
python-bits: 64
OS: Linux
OS-release: 5.15.0-91-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.14.3
libnetcdf: 4.9.2
xarray: 2023.12.0
pandas: 2.1.4
numpy: 1.26.2
scipy: None
netCDF4: 1.6.5
pydap: None
h5netcdf: 1.3.0
h5py: 3.10.0
Nio: None
zarr: None
cftime: 1.6.3
nc_time_axis: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 68.2.2
pip: 23.3.1
conda: None
pytest: None
mypy: None
IPython: 8.18.1
sphinx: None
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8544/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |