home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 876786652

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
876786652 MDU6SXNzdWU4NzY3ODY2NTI= 5263 to_zarr append errors when using encoding point in wrong direction 35538868 open 0     0 2021-05-05T19:57:57Z 2021-07-04T03:28:00Z   NONE      

When I try to append to a zarr store created from encoded data it isn't clear that I need to decode the data I want to append.

When I run the attached code, I get an error:

ValueError: failed to prevent overwriting existing key add_offset in attrs. This is probably an encoding field used by xarray to describe how a variable is serialized. To proceed, remove this key from the variable's attributes manually.

Following that error, if I just remove the encoding I can append to the zarr store, but the data isn't encoding correctly.

The fix is to xr.decode_cf(data) and then append.

It would help if the to_zarr append documentation made this clearer.

Example given here: https://github.com/cgentemann/cloud_science/blob/master/make_zarr/zarr_append_issue.ipynb

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5263/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.572ms · About: xarray-datasette