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/6715#issuecomment-1424713396,https://api.github.com/repos/pydata/xarray/issues/6715,1424713396,IC_kwDOAMm_X85U62a0,3383837,2023-02-09T19:38:17Z,2023-02-09T19:38:17Z,CONTRIBUTOR,@ShengpeiWang Has the right preventative solution. What do you do when you mess this up in an interactive python session? I can find no way to unlock the file other than renaming it and then opening and closing. The lock even persists through restarting the python interpreter.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1280507371
https://github.com/pydata/xarray/issues/6715#issuecomment-1180875642,https://api.github.com/repos/pydata/xarray/issues/6715,1180875642,IC_kwDOAMm_X85GYrt6,34722076,2022-07-11T21:12:58Z,2022-07-11T21:12:58Z,NONE,"Inspired by this commend https://github.com/rasterio/rasterio/issues/2490#issuecomment-1164700425 from @snowman2, files opened with `xr.open_rasterio` needs to be closed to prevent io locking. Loading the data into memory and close the file after reading resolves the issue, see the last code snippet here https://xarray.pydata.org/en/v0.7.1/io.html:
```with xr.open_rasterio(path) as ds:
# load all data from the transformed dataset, to ensure we can
# use it after closing each original file
ds.load()
return ds```","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1280507371
https://github.com/pydata/xarray/issues/6715#issuecomment-1174034947,https://api.github.com/repos/pydata/xarray/issues/6715,1174034947,IC_kwDOAMm_X85F-loD,78166093,2022-07-04T17:47:54Z,2022-07-04T17:47:54Z,NONE,I've updated with a complete reproducible example [located here](https://github.com/jamie-sgro/xarray-recreate-bug). I'd love a second set of eyes on what might be the root cause of the bug,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1280507371
https://github.com/pydata/xarray/issues/6715#issuecomment-1163423319,https://api.github.com/repos/pydata/xarray/issues/6715,1163423319,IC_kwDOAMm_X85FWG5X,78166093,2022-06-22T17:39:06Z,2022-06-22T19:59:35Z,NONE,"Not directly related, but worth noting, it looks like the `LRUCache._cache` only has dictionary items for the first 2 files, then a partial record of the third file (only 8 of the 12 layers are found), and no layers from the fourth file

","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1280507371