home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 543197350 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 4

  • rabernat 4
  • dopplershift 1
  • daxsoule 1
  • zoj613 1

author_association 3

  • MEMBER 4
  • NONE 2
  • CONTRIBUTOR 1

issue 1

  • "[Errno -90] NetCDF: file not found: b" when opening netCDF from server · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1464128552 https://github.com/pydata/xarray/issues/3653#issuecomment-1464128552 https://api.github.com/repos/pydata/xarray/issues/3653 IC_kwDOAMm_X85XRNQo zoj613 44142765 2023-03-10T17:24:35Z 2023-03-10T17:26:06Z NONE

More concise syntax for the same thing

```python import xarray as xr import fsspec

url = 'https://www.ldeo.columbia.edu/~rpa/NOAA_NCDC_ERSST_v3b_SST.nc' with fsspec.open(url) as fobj: ds = xr.open_dataset(fobj) print(ds) ```

When trying this snippet more than once I get a ValueError: I/O operation on closed file. exception. Any Idead why this might be the case?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350
832712426 https://github.com/pydata/xarray/issues/3653#issuecomment-832712426 https://api.github.com/repos/pydata/xarray/issues/3653 MDEyOklzc3VlQ29tbWVudDgzMjcxMjQyNg== rabernat 1197350 2021-05-05T14:01:25Z 2021-05-05T14:01:33Z MEMBER

Update: there is now a way to read a remote netCDF file from an HTTP server directly using the netcdf-python library. The trick is to append #mode=bytes to the end of the url.

```python import xarray as xr import netCDF4 # I'm using version 1.5.6

url = "https://www.ldeo.columbia.edu/~rpa/NOAA_NCDC_ERSST_v3b_SST.nc#mode=bytes"

raw netcdf4 Dataset

ds = netCDF4.Dataset(url)

xarray Dataset

ds = xr.open_dataset(url) ```

{
    "total_count": 12,
    "+1": 5,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 6,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350
570163736 https://github.com/pydata/xarray/issues/3653#issuecomment-570163736 https://api.github.com/repos/pydata/xarray/issues/3653 MDEyOklzc3VlQ29tbWVudDU3MDE2MzczNg== rabernat 1197350 2020-01-02T10:05:54Z 2020-01-02T10:05:54Z MEMBER

More concise syntax for the same thing

```python import xarray as xr import fsspec

url = 'https://www.ldeo.columbia.edu/~rpa/NOAA_NCDC_ERSST_v3b_SST.nc' with fsspec.open(url) as fobj: ds = xr.open_dataset(fobj) print(ds) ```

{
    "total_count": 3,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350
570156277 https://github.com/pydata/xarray/issues/3653#issuecomment-570156277 https://api.github.com/repos/pydata/xarray/issues/3653 MDEyOklzc3VlQ29tbWVudDU3MDE1NjI3Nw== rabernat 1197350 2020-01-02T09:34:58Z 2020-01-02T09:34:58Z MEMBER

Xarray does not appear to be able to open netCDF from a url without a THREADS serve

This is not a limitation of xarray per se, but of the netcdf4-python library itself.

You can, however, get around this limitation by using fsspec.

```python import xarray as xr from fsspec.implementations.http import HTTPFileSystem

your Azure URL is not publicly accessible, so I used another one

url = 'https://www.ldeo.columbia.edu/~rpa/NOAA_NCDC_ERSST_v3b_SST.nc' fs = HTTPFileSystem() fobj = fs.open(url) ds = xr.open_dataset(fobj) ds ```

This will not be very performant, but it will work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350
570095263 https://github.com/pydata/xarray/issues/3653#issuecomment-570095263 https://api.github.com/repos/pydata/xarray/issues/3653 MDEyOklzc3VlQ29tbWVudDU3MDA5NTI2Mw== daxsoule 29660939 2020-01-02T00:09:36Z 2020-01-02T00:26:11Z NONE

Thanks for the responses. I think I understand this issue now. I am not an expert, but Xarray does not appear to be able to open netCDF from a url without a THREADS server. In this case

```python import xarray as xr url = https://opendap.oceanobservatories.org/thredds/dodsC/ooi/dax.soule@qc.cuny.edu/20191228T052214778Z-RS03ECAL-MJ03E-06-BOTPTA302-streamed-botpt_nano_sample/deployment0001_RS03ECAL-MJ03E-06-BOTPTA302-streamed-botpt_nano_sample_20191005T000000-20191005T235959.950000.nc

ds = xr.open_dataset(url) ``` Works just fine. So I see how to make xarray work using OpenDAP, but I am still unable to open a file directly from object store using the HTTPS URL.

I am not sure that this is supported, but if it is I would love to see an example.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350
570089112 https://github.com/pydata/xarray/issues/3653#issuecomment-570089112 https://api.github.com/repos/pydata/xarray/issues/3653 MDEyOklzc3VlQ29tbWVudDU3MDA4OTExMg== dopplershift 221526 2020-01-01T22:34:46Z 2020-01-01T22:34:46Z CONTRIBUTOR

This isn't accessing netCDF using opendap, it's directly accessing using HTTP. Did xarray or netCDF gain support for this and I failed to notice?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350
570088451 https://github.com/pydata/xarray/issues/3653#issuecomment-570088451 https://api.github.com/repos/pydata/xarray/issues/3653 MDEyOklzc3VlQ29tbWVudDU3MDA4ODQ1MQ== rabernat 1197350 2020-01-01T22:23:53Z 2020-01-01T22:23:53Z MEMBER

Does it work if you opens the url directly with netcdf4, bypassing xarray? If not, then it’s a netcdf4 or thredds problem.

On Jan 1, 2020, at 10:44 PM, Dax Soule notifications@github.com wrote:

 Reopened #3653.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  "[Errno -90] NetCDF: file not found: b" when opening netCDF from server 543197350

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 13.176ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows