home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 383057458

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
383057458 MDU6SXNzdWUzODMwNTc0NTg= 2560 Lock related problem in on travis-ci but not on local machine 514522 closed 0     10 2018-11-21T10:42:19Z 2018-12-23T20:11:32Z 2018-12-23T20:11:32Z CONTRIBUTOR      

There is a KeyError at xarray.backends.file_manager.CachingFileManager for the acquire method on these lines:

with self._lock: try: file = self._cache[self._key]

which does not happen when I test on my macos.

Let me know if you require further testing on my part.

Full log:

``` =================================== FAILURES ===================================

_____ testqtl_xarr _______

self = <xarray.backends.file_manager.CachingFileManager object at 0x7f59e2cab978>

def acquire(self):

    """Acquiring a file object from the manager.



    A new file is only opened if it has expired from the

    least-recently-used cache.



    This method uses a reentrant lock, which ensures that it is

    thread-safe. You can safely acquire a file in multiple threads at the

    same time, as long as the underlying file object is thread-safe.



    Returns

    -------

    An open file object, as returned by ``opener(*args, **kwargs)``.

    """

    with self._lock:

        try:
          file = self._cache[self._key]

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/file_manager.py:137:


self = <xarray.backends.lru_cache.LRUCache object at 0x7f5a04a9c630>

key = [<function _open_netcdf4_group at 0x7f5a04abc1e0>, ('/tmp/tmprj8lwlat/xarr.hdf5', CombinedLock([<SerializableLock: 447...>])), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('group', '/foo/chr1'), ('persist', False))]

def __getitem__(self, key):

    # record recent use of the key by moving it to the front of the list

    with self._lock:
      value = self._cache[key]

E KeyError: [<function _open_netcdf4_group at 0x7f5a04abc1e0>, ('/tmp/tmprj8lwlat/xarr.hdf5', CombinedLock([<SerializableLock: 4471090f-419e-49bd-9d27-4156e09febdd>, <SerializableLock: b9eb5ba1-2830-402e-b48f-3ef45768b7c2>])), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('group', '/foo/chr1'), ('persist', False))]

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/lru_cache.py:43: KeyError

During handling of the above exception, another exception occurred:

def test_qtl_xarr():

    with limix.example.file_example("xarr.hdf5.bz2") as filepath:

        filepath = limix.sh.extract(filepath, verbose=False)

        sample_ids = limix.io.hdf5.fetch(filepath, "/foo/chr1/col_header/sample_ids")



        rsid = dict()

        for i in range(1, 3):

            rsid[i] = limix.io.hdf5.fetch(

                filepath, "/foo/chr{}/row_header/rsid".format(i)

            )



        G = []

        for i in range(1, 3):
          g = xr.open_dataset(filepath, "/foo/chr{}".format(i))["matrix"]

miniconda/envs/test-environment/lib/python3.6/site-packages/limix/qtl/test/test_qtl_xarr.py:20:


miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/api.py:320: in open_dataset

filename_or_obj, group=group, lock=lock, **backend_kwargs)

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/netCDF4_.py:355: in open

return cls(manager, lock=lock, autoclose=autoclose)

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/netCDF4_.py:314: in init

self.format = self.ds.data_model

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/netCDF4_.py:359: in ds

return self._manager.acquire().value

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/file_manager.py:143: in acquire

file = self._opener(*self._args, **kwargs)

miniconda/envs/test-environment/lib/python3.6/site-packages/xarray/backends/netCDF4_.py:247: in _open_netcdf4_group

ds = nc4.Dataset(filename, mode=mode, **kwargs)

netCDF4/_netCDF4.pyx:2135: in netCDF4._netCDF4.Dataset.init

???

???

E OSError: [Errno -101] NetCDF: HDF error: b'/tmp/tmprj8lwlat/xarr.hdf5'

netCDF4/_netCDF4.pyx:1752: OSError

===================== 1 failed, 50 passed in 65.82 seconds =====================

The command "bash <(curl -fsSL https://raw.githubusercontent.com/horta/ci/master/travis.sh)" exited with 1.

Done. Your build exited with 1. ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2560/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

  • 0 rows from issues_id in issues_labels
  • 10 rows from issue in issue_comments
Powered by Datasette · Queries took 0.574ms · About: xarray-datasette