home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 839823306

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
839823306 MDU6SXNzdWU4Mzk4MjMzMDY= 5070 requires io.IOBase subclass rather than duck file-like 6042212 closed 0     3 2021-03-24T15:06:39Z 2021-03-29T16:22:35Z 2021-03-29T16:22:35Z CONTRIBUTOR      

If you open_dataset on a file-like object, you will get the error TypeError: cannot read the magic number form [sic!] This is because in xarray.core.utils.read_magic_number, we have isinstance(filename_or_obj, io.IOBase), which is not necessarily the case for a file-like. I recommend changing this to hasattr(filename_or_obj, "read").

Example: ``` In [1]: import fsspec

In [2]: fs = fsspec.filesystem('file')

In [3]: f = fs.open("201704010000.CHRTOUT_DOMAIN1.comp")

In [5]: import xarray as xr

In [6]: xr.open_dataset(f) TypeError `` Wherefis aLocalFileOpener`, made to be lazy and defer file opening, so that it can be pickled.

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

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.622ms · About: xarray-datasette