home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1153654151

This data as json

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/6693#issuecomment-1153654151 https://api.github.com/repos/pydata/xarray/issues/6693 1153654151 IC_kwDOAMm_X85Ew12H 14808389 2022-06-13T08:53:32Z 2022-06-13T20:33:48Z MEMBER

If you open the changed file in a new session you get the expected result, which indicates that this issue is a due to file caching. If you call python xr.backends.file_manager.FILE_CACHE.clear() in between the xr.open_dataset calls I can confirm that the calls are loaded as expected (don't use that in your code, though, that is a implementation detail).

If you actually use the dataset (e.g. by calling .load()), the file cache seems to reset and the subsequent open also has the expected shape.

The same happens if you pass lock=False to open_dataset, so if you can make sure to have closed the file (ds.close()) before the next open you should be able to use that.

In general I think it would be best to avoid rewriting files (whether that is by modifying or by deleting the file and writing it again), but I'm not an expert on backends so there might be a way to handle that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1268956107
Powered by Datasette · Queries took 0.676ms · About: xarray-datasette