issues: 1766076828
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1766076828 | I_kwDOAMm_X85pRDGc | 7932 | RecursionError: maximum recursion depth exceeded while calling a Python object | 90645468 | closed | 0 | 2 | 2023-06-20T20:07:22Z | 2023-11-06T06:14:45Z | 2023-11-06T06:14:45Z | NONE | What happened?Traceback (most recent call last): File "/home/qiahan/.conda/envs/firstEnv/lib/python3.9/site-packages/xarray/core/variable.py", line 264, in _as_array_or_item data = np.asarray(data) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/array/core.py", line 1701, in array x = self.compute() File "/home/qiahan/.local/lib/python3.9/site-packages/dask/base.py", line 314, in compute (result,) = compute(self, traverse=False, kwargs) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/base.py", line 599, in compute results = schedule(dsk, keys, kwargs) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/threaded.py", line 89, in get results = get_async( File "/home/qiahan/.local/lib/python3.9/site-packages/dask/local.py", line 511, in get_async raise_exception(exc, tb) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/local.py", line 319, in reraise raise exc File "/home/qiahan/.local/lib/python3.9/site-packages/dask/local.py", line 224, in execute_task result = _execute_task(task, data) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/core.py", line 119, in _execute_task return func((_execute_task(a, cache) for a in args)) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/core.py", line 119, in <genexpr> return func((_execute_task(a, cache) for a in args)) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/core.py", line 119, in _execute_task return func((_execute_task(a, cache) for a in args)) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/core.py", line 119, in <genexpr> return func((_execute_task(a, cache) for a in args)) File "/home/qiahan/.local/lib/python3.9/site-packages/dask/core.py", line 38, in istask return type(x) is tuple and x and callable(x[0]) RecursionError: maximum recursion depth exceeded while calling a Python object What did you expect to happen?When the for loop is 1500 times, no error, but when it is like 17000 times, I got this recursion error. Minimal Complete Verifiable Example```Python for count_i,t in enumerate(all_resample.time.to_numpy()[96:17137],96): print(t, flush=True) ds_era5land = all_resample.sel(time=t, method='nearest').compute() ds = xr.merge([ds_era5land]) ds_ss = xr.Dataset() ds_ss["Rin"] = Rin.sel(time=t, method='nearest').compute() ds_ss["Rli"] = Rli.sel(time=t, method='nearest').compute() ds_ss["p"] = ds["sp"]/100 # Pa -> hPa ds_ss["Ta"] = ds["t2m"] - 273.15 # K -> degC ds_ss["ea"] = vc.calculate_es(ds["d2m"] - 273.15) ds_ss["u"] = (ds["u10"] ** 2 + ds["v10"] ** 2) ** 0.5 ds_ss["Precip_msr"] = ds["tp"]*1000 # mm ds_ss['LAI'] = lai.sel(time=t, method='nearest').compute() ds_ss['CO2'] = ds_co2_10km.sel(time=t, method='nearest').compute() ds_ss['SSM'] = SSM.sel(time=t, method='nearest').compute()
``` MVCE confirmation
Relevant log outputNo response Anything else we need to know?No response Environment
xarray version is 2022.9.0, python is 3.9.16
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/7932/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
not_planned | 13221727 | issue |