home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where user = 9010180 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 4

  • xarray 0.18.0 raises ValueError, not FileNotFoundError, when opening a non-existent file 2
  • open_dataset uses cftime, not datetime64, when calendar attribute is "Gregorian" 1
  • xarray can't append to Zarrs with byte-string variables 1
  • AttributeError using map_blocks with dask 2021.05.0 1

user 1

  • pont-us · 5 ✖

author_association 1

  • NONE 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
843895606 https://github.com/pydata/xarray/issues/5329#issuecomment-843895606 https://api.github.com/repos/pydata/xarray/issues/5329 MDEyOklzc3VlQ29tbWVudDg0Mzg5NTYwNg== pont-us 9010180 2021-05-19T08:54:57Z 2021-05-19T08:54:57Z NONE

I think it is OK to add a dedicated xarray.EngineGuessingError, but I'd not try anything more complex and in general invite users to pass engine explicitly.

I'm reluctantly inclined to agree. (But "reluctantly" only because this means that we may have a lot of xcube code to check and update now.) If the engine is explicitly specified, the question of which exceptions to expect becomes a lot easier to handle, since it's now just between the caller and the engine.

Probably the open_dataset documentation should actively discourage reliance on engine guessing for anything but interactive use, and point out that callers need to check the documentation for the selected engine to determine which exceptions (other than EngineGuessingError) might be thrown.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray 0.18.0 raises ValueError, not FileNotFoundError, when opening a non-existent file 894125618
843830826 https://github.com/pydata/xarray/issues/5331#issuecomment-843830826 https://api.github.com/repos/pydata/xarray/issues/5331 MDEyOklzc3VlQ29tbWVudDg0MzgzMDgyNg== pont-us 9010180 2021-05-19T07:34:34Z 2021-05-19T07:34:34Z NONE

Thanks for raising an issue @pont-us. I believe this may have been fixed by #5271 (which was merged just after the 0.18.0 release). Could you install the development version of xarray and try again to see if the problem persists?

Thanks, I've just tested the current head (24c61522) with both the minimal example above and the xcube unit test that was failing with dask 2021.05.0, and can confirm that the error no longer occurs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  AttributeError using map_blocks with dask 2021.05.0 894497993
843138842 https://github.com/pydata/xarray/issues/5329#issuecomment-843138842 https://api.github.com/repos/pydata/xarray/issues/5329 MDEyOklzc3VlQ29tbWVudDg0MzEzODg0Mg== pont-us 9010180 2021-05-18T12:43:55Z 2021-05-18T13:40:41Z NONE

@aurghs Point taken, but in that case the xarray.open_dataset documentation probably needs updating: currently it says ‘Strings and Path objects are interpreted as a path to a netCDF file or an OpenDAP URL and opened with python-netCDF4, unless the filename ends with .gz…’. In particular I find the behaviour with Path confusing: this type is unambiguously a filesystem path, but still results in a ValueError rather than FileNotFoundError. And in Python 3, str and bytes are distinct (though I suppose a str might still be a URL rather than a file).

In principle, though, I'd be OK with any selection of potential exceptions, as long as they're documented. The current practical problem for us (the xcube developers) is that the behaviour change from 0.17 to 0.18 means that we now have to audit our existing codebases for potential uncaught ValueErrors.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray 0.18.0 raises ValueError, not FileNotFoundError, when opening a non-existent file 894125618
828294723 https://github.com/pydata/xarray/issues/5224#issuecomment-828294723 https://api.github.com/repos/pydata/xarray/issues/5224 MDEyOklzc3VlQ29tbWVudDgyODI5NDcyMw== pont-us 9010180 2021-04-28T09:14:34Z 2021-04-28T09:14:34Z NONE

Could you kindly share the Python traceback from the error message?

Sorry, that was remiss of me. Here's the output from the test script above, including the traceback.

$ python test_append_bytes.py Creating |U1 Zarr... Appending to |U1 Zarr with Zarr library... Appending to |U1 Zarr with xarray... Creating |S1 Zarr... Appending to |S1 Zarr with Zarr library... Appending to |S1 Zarr with xarray... Traceback (most recent call last): File "/home/pont/test_append_bytes.py", line 21, in <module> test_append("|S1", "test-s.zarr") File "/home/pont/test_append_bytes.py", line 18, in test_append ds_to_append.to_zarr(zarr_path, mode="a") File "/home/pont/loc/repos/xarray/xarray/core/dataset.py", line 1877, in to_zarr return to_zarr( File "/home/pont/loc/repos/xarray/xarray/backends/api.py", line 1414, in to_zarr _validate_datatypes_for_zarr_append(dataset) File "/home/pont/loc/repos/xarray/xarray/backends/api.py", line 1261, in _validate_datatypes_for_zarr_append check_dtype(k) File "/home/pont/loc/repos/xarray/xarray/backends/api.py", line 1252, in check_dtype raise ValueError( ValueError: Invalid dtype for data variable: <xarray.DataArray 'x' ()> array(b'', dtype='|S1') dtype must be a subtype of number, datetime, bool, a fixed sized string, a fixed size unicode string or an object

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray can't append to Zarrs with byte-string variables 868976909
823311993 https://github.com/pydata/xarray/issues/5093#issuecomment-823311993 https://api.github.com/repos/pydata/xarray/issues/5093 MDEyOklzc3VlQ29tbWVudDgyMzMxMTk5Mw== pont-us 9010180 2021-04-20T14:17:42Z 2021-04-20T14:17:42Z NONE

Thank you very much for the swift fix -- I had been meaning to put a PR together but things have been very busy lately.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_dataset uses cftime, not datetime64, when calendar attribute is "Gregorian" 844712857

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 12.147ms · About: xarray-datasette