home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "MEMBER", issue = 894125618 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • shoyer · 2 ✖

issue 1

  • xarray 0.18.0 raises ValueError, not FileNotFoundError, when opening a non-existent file · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
843757305 https://github.com/pydata/xarray/issues/5329#issuecomment-843757305 https://api.github.com/repos/pydata/xarray/issues/5329 MDEyOklzc3VlQ29tbWVudDg0Mzc1NzMwNQ== shoyer 1217238 2021-05-19T05:28:04Z 2021-05-19T05:28:04Z MEMBER

Actually, thinking about this a little more, you should get NoMatchingEngineError if you try to open a text file with Xarray.

But if you pass in a local filesystem path and try to open an entirely non-existent file, then FileNotFoundError would be appropriate.

In theory, one could write an open_dataset backend that interprets a local path in an arbitrary way, but that is not the intent of open_dataset, which is intended to handle things like files/directories, other URIs and file contents. If you want to interpret strings very differently you should write a new function for opening.

{
    "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
843752655 https://github.com/pydata/xarray/issues/5329#issuecomment-843752655 https://api.github.com/repos/pydata/xarray/issues/5329 MDEyOklzc3VlQ29tbWVudDg0Mzc1MjY1NQ== shoyer 1217238 2021-05-19T05:15:39Z 2021-05-19T05:15:39Z MEMBER

Ouch! I agree this is annoying. And yes, the open_dataset docs definitely need updating.

The general rule is that ValueError is too generic of an exception for it to be appropriate to catch in user code. So indeed, if you need to catch that error something has gone wrong :).

Given this use case, perhaps we should have a special exception type here, something like xarray.NoMatchingEngineError.

{
    "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

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