home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "NONE" and issue = 516306758 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 6

  • borispf 1
  • Hoeze 1
  • jsadler2 1
  • dnerini 1
  • bluetyson 1
  • FlorisCalkoen 1

issue 1

  • Error when writing string coordinate variables to zarr · 6 ✖

author_association 1

  • NONE · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1205346130 https://github.com/pydata/xarray/issues/3476#issuecomment-1205346130 https://api.github.com/repos/pydata/xarray/issues/3476 IC_kwDOAMm_X85H2B9S FlorisCalkoen 44444001 2022-08-04T14:36:26Z 2022-08-04T14:36:26Z NONE

@delgadom I just noticed that your proposed solution has the side effect of also converting cftime objects (e.g., below) to unicode strings.

``` xarray.DataArray 'time' (time: 1) array([cftime.DatetimeNoLeap(2007, 7, 2, 12, 0, 0, 0, has_year_zero=True)], dtype=object)

``` I updated your lines using @Hoeze' clear function and that seems to work for now.

```[python] for v in list(ds.coords.keys()): if ds.coords[v].dtype == object: ds[v].encoding.clear()

for v in list(ds.variables.keys()):
    if ds[v].dtype == object:
        ds[v].encoding.clear()

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when writing string coordinate variables to zarr 516306758
1012775218 https://github.com/pydata/xarray/issues/3476#issuecomment-1012775218 https://api.github.com/repos/pydata/xarray/issues/3476 IC_kwDOAMm_X848Xbky bluetyson 17399794 2022-01-14T04:53:36Z 2022-01-14T04:53:36Z NONE

Thanks for that, looks like I just came across this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when writing string coordinate variables to zarr 516306758
841692487 https://github.com/pydata/xarray/issues/3476#issuecomment-841692487 https://api.github.com/repos/pydata/xarray/issues/3476 MDEyOklzc3VlQ29tbWVudDg0MTY5MjQ4Nw== Hoeze 1200058 2021-05-15T16:56:00Z 2021-05-15T17:03:00Z NONE

Hi, I also keep running into this issue all the time. Right now, there is no way of round-tripping xr.open_zarr().to_zarr(), also because of https://github.com/pydata/xarray/issues/5219.

The only workaround that seems to help is the following: python to_store = xrds.copy() for var in to_store.variables: to_store[var].encoding.clear()

{
    "total_count": 3,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 1
}
  Error when writing string coordinate variables to zarr 516306758
630863198 https://github.com/pydata/xarray/issues/3476#issuecomment-630863198 https://api.github.com/repos/pydata/xarray/issues/3476 MDEyOklzc3VlQ29tbWVudDYzMDg2MzE5OA== borispf 624352 2020-05-19T14:38:26Z 2020-05-19T14:38:26Z NONE

I ran into the same issue. It seems like zarr is inserting VLenUTF8 as a filter, but the loaded data array already has that as a filter so it's trying to double encode . So another workaround is to delete the filters on site_code:

``` import xarray as xr

sm_from_zarr = xr.open_zarr('tmp/test_sm_zarr') del sm_from_zarr.site_code.encoding["filters"] sm_from_zarr.to_zarr('tmp/test_sm_zarr_from', mode='w') ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when writing string coordinate variables to zarr 516306758
620090096 https://github.com/pydata/xarray/issues/3476#issuecomment-620090096 https://api.github.com/repos/pydata/xarray/issues/3476 MDEyOklzc3VlQ29tbWVudDYyMDA5MDA5Ng== dnerini 11967971 2020-04-27T16:22:35Z 2020-04-27T16:22:35Z NONE

I'm experiencing the same issue, which seems to be also related to one of my coordinates having object as datatype. Luckily, the workaround proposed by @jsadler2 works in my case, too.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when writing string coordinate variables to zarr 516306758
550044335 https://github.com/pydata/xarray/issues/3476#issuecomment-550044335 https://api.github.com/repos/pydata/xarray/issues/3476 MDEyOklzc3VlQ29tbWVudDU1MDA0NDMzNQ== jsadler2 6943441 2019-11-05T22:07:20Z 2019-11-05T22:07:20Z NONE

Sure In [5]: print(ds) <xarray.Dataset> Dimensions: (datetime: 20, site_code: 20) Coordinates: * datetime (datetime) datetime64[ns] 1970-01-01 ... 1970-01-01T19:00:00 * site_code (site_code) object '01302020' '01303000' ... '01315000' Data variables: streamflow (datetime, site_code) float64 dask.array<shape=(20, 20), chunksize=(20, 20)>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error when writing string coordinate variables to zarr 516306758

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 3598.665ms · About: xarray-datasette