home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 528103103

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2535#issuecomment-528103103 https://api.github.com/repos/pydata/xarray/issues/2535 528103103 MDEyOklzc3VlQ29tbWVudDUyODEwMzEwMw== 5925045 2019-09-04T21:50:38Z 2019-09-04T21:50:38Z NONE

Similar error when using xr.open_rasterio, a workaround seems to be to change the order in which my datasets are opened. Example:

```python import xarray as xr ds = xr.open_dataset('/data/someFile.nc') # netcdf m = xr.open_rasterio('/data/otherFile.tif') # geotif

Everything is happy

```

```python import xarray as xr m = xr.open_rasterio('/data/otherFile.tif') # geotif ds = xr.open_dataset('/data/someFile.nc') # netcdf

Results in the following error

```

``` Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/xarray/backends/file_manager.py", line 186, in _acquire_with_cache_info file = self._cache[self._key] File "/usr/local/lib/python3.6/dist-packages/xarray/backends/lru_cache.py", line 42, in getitem value = self._cache[key] KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/data/someFile.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False))]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/dist-packages/xarray/backends/api.py", line 420, in open_dataset filename_or_obj, group=group, lock=lock, backend_kwargs) File "/usr/local/lib/python3.6/dist-packages/xarray/backends/netCDF4_.py", line 335, in open autoclose=autoclose) File "/usr/local/lib/python3.6/dist-packages/xarray/backends/netCDF4_.py", line 293, in init self.format = self.ds.data_model File "/usr/local/lib/python3.6/dist-packages/xarray/backends/netCDF4_.py", line 344, in ds return self.acquire() File "/usr/local/lib/python3.6/dist-packages/xarray/backends/netCDF4.py", line 338, in _acquire with self._manager.acquire_context(needs_lock) as root: File "/usr/lib/python3.6/contextlib.py", line 81, in enter return next(self.gen) File "/usr/local/lib/python3.6/dist-packages/xarray/backends/file_manager.py", line 174, in acquire_context file, cached = self._acquire_with_cache_info(needs_lock) File "/usr/local/lib/python3.6/dist-packages/xarray/backends/file_manager.py", line 192, in _acquire_with_cache_info file = self._opener(*self._args, kwargs) File "netCDF4/_netCDF4.pyx", line 2291, in netCDF4._netCDF4.Dataset.init File "netCDF4/_netCDF4.pyx", line 1855, in netCDF4._netCDF4._ensure_nc_success OSError: [Errno -101] NetCDF: HDF error: b'/data/someFile.nc' ```

```

xr.show_versions()

INSTALLED VERSIONS

commit: None python: 3.6.6 (default, Sep 12 2018, 18:26:19) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] python-bits: 64 OS: Linux OS-release: 4.15.0-58-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: C.UTF-8 LANG: C.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.2 libnetcdf: 4.6.3

xarray: 0.12.3 pandas: 0.25.1 numpy: 1.13.3 scipy: 1.3.1 netCDF4: 1.5.1.2 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.0.3.4 nc_time_axis: None PseudoNetCDF: None rasterio: 1.0.26 cfgrib: None iris: None bottleneck: None dask: 2.3.0 distributed: 2.3.2 matplotlib: 3.1.1 cartopy: 0.17.0 seaborn: None numbagg: None setuptools: 39.0.1 pip: 9.0.1 conda: None pytest: None IPython: None sphinx: None ```

And I have the HDF5_USE_FILE_LOCKING environment variable set to FALSE.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  376389539
Powered by Datasette · Queries took 0.499ms · About: xarray-datasette