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/7814#issuecomment-1567037851,https://api.github.com/repos/pydata/xarray/issues/7814,1567037851,IC_kwDOAMm_X85dZxmb,14808389,2023-05-29T11:53:37Z,2023-05-29T12:10:00Z,MEMBER,"Actually, it goes away with `pip install jinja2`. We don't use `jinja2` at all, so either this is some kind of weird effect on garbage collection (a timing issue?), or `dask` is doing something differently as soon as `jinja2` is available.
Edit: most likely this is a timing issue... the offending line tries to make use of the internal `acquire` function, which I think at that point has already been destroyed. To fix that, I think we need to somehow store a reference on the file manager?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906
https://github.com/pydata/xarray/issues/7814#issuecomment-1567025628,https://api.github.com/repos/pydata/xarray/issues/7814,1567025628,IC_kwDOAMm_X85dZunc,14808389,2023-05-29T11:41:06Z,2023-05-29T11:56:20Z,MEMBER,"I *can* reproduce this locally:
- download and unpack the files from https://github.com/pydata/xarray/issues/7814#issuecomment-1535168128
- use `mamba create -n test python=3.11 xarray netcdf4` to create the environment (note: no `dask`)
- use `pip install ""dask[array]""` to install `dask` (does not pull `distributed` like the package from `conda-forge`)
- put the code into a script and execute it
For reference, the full traceback is:
```pytb
Exception ignored in:
Traceback (most recent call last):
File ""/home/jmagin/.local/opt/mambaforge/envs/test/lib/python3.9/site-packages/xarray/backends/file_manager.py"", line 246, in __del__
TypeError: 'NoneType' object is not callable
```
As far as I can tell, this means we're using something from `distributed` with a broken fallback, since the error goes away as soon as I *install* `distributed`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906
https://github.com/pydata/xarray/issues/7814#issuecomment-1536900927,https://api.github.com/repos/pydata/xarray/issues/7814,1536900927,IC_kwDOAMm_X85bmz8_,25112215,2023-05-05T23:27:17Z,2023-05-05T23:28:08Z,NONE,"Thanks Kai,
I have attached the output of `xr.show_versions()` and of `pip list`.
> Does this happen only with these special files, or do you experience this every time?
I tried with two netcdf files from https://www.northwestknowledge.net/metdata/data/ and got the same _TypeError: 'NoneType' object is not callable_
> Does the problem persists when specifying engine=""netcdf4"" or engine=""h5netcdf"" in the call to open_mfdataset?
Only engine=""netcdf4"" works as a parameter but I get the same error, h5netcdf is not recognized as an engine.
> Does this also happen, if you open the files one-by-one (with xr.open_dataset) and combine the Datasets with xr.concat?
Yes, opening files with xr.open_dataset and combining them with xr.concat gives the same error.
Please note the following that I just realized, the resulting combined netCDF file is actually created even though the errors are displayed.
Also, as I mentioned in my first message, if I run the commands line by line in the python console no error message is displayed, this happens only when the code is ran as a script.
Paul
[pip_list.txt](https://github.com/pydata/xarray/files/11410616/pip_list.txt)
[xr.show_versions.txt](https://github.com/pydata/xarray/files/11410617/xr.show_versions.txt)
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906
https://github.com/pydata/xarray/issues/7814#issuecomment-1535776861,https://api.github.com/repos/pydata/xarray/issues/7814,1535776861,IC_kwDOAMm_X85bihhd,5821660,2023-05-05T06:31:20Z,2023-05-05T06:31:20Z,MEMBER,"@paul0207 Thanks for providing the datafiles. I can't reproduce on my machine. Please provide more information, the output of `xr.show_versions()` would help and a complete traceback of the error you are experiencing.
A complete list of installed Python Packages would be nice (eg. by `pip list`), too.
Another couple of questions to get some more insight:
- Does this happen only with these special files, or do you experience this every time?
- Does the problem persists when specifying `engine=""netcdf4""` or `engine=""h5netcdf""` in the call to `open_mfdataset`?
- Does this also happen, if you open the files one-by-one (with `xr.open_dataset`) and combine the Datasets with `xr.concat`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906
https://github.com/pydata/xarray/issues/7814#issuecomment-1535168128,https://api.github.com/repos/pydata/xarray/issues/7814,1535168128,IC_kwDOAMm_X85bgM6A,25112215,2023-05-04T17:44:14Z,2023-05-04T17:44:31Z,NONE,"Deepak, thanks for replying, I have attached a couple of my netCDF files. Hopefully these will help for reproducing the issue.
[Archive.zip](https://github.com/pydata/xarray/files/11400070/Archive.zip)
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906
https://github.com/pydata/xarray/issues/7814#issuecomment-1534000660,https://api.github.com/repos/pydata/xarray/issues/7814,1534000660,IC_kwDOAMm_X85bbv4U,2448579,2023-05-04T02:35:39Z,2023-05-04T02:35:39Z,MEMBER,We;ll need a reproducible example,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906
https://github.com/pydata/xarray/issues/7814#issuecomment-1533918236,https://api.github.com/repos/pydata/xarray/issues/7814,1533918236,IC_kwDOAMm_X85bbbwc,30606887,2023-05-04T00:41:32Z,2023-05-04T00:41:32Z,NONE,"Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the [Contributing Guide](https://docs.xarray.dev/en/latest/contributing.html) for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1695028906