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