Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surprising N5FSStore test failure #11

Open
joshmoore opened this issue Nov 15, 2021 · 2 comments
Open

Surprising N5FSStore test failure #11

joshmoore opened this issue Nov 15, 2021 · 2 comments

Comments

@joshmoore
Copy link
Member

Using the Python 3.9 / Debian sid Dockerfile in zarr-developers/zarr-python#858 and checking out the master branch, zarr/tests/test_core.py::TestArrayWithN5FSStore::test_nchunks_initialized fails as below. This is not the case for the Python 3.9 build in GHA.

cc: @d-v-b

zarr/tests/test_core.py:1811:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zarr/core.py:1280: in __setitem__
    self.set_basic_selection(pure_selection, value, fields=fields)
zarr/core.py:1375: in set_basic_selection
    return self._set_basic_selection_nd(selection, value, fields=fields)
zarr/core.py:1675: in _set_basic_selection_nd
    self._set_selection(indexer, value, fields=fields)
zarr/core.py:1747: in _set_selection
    self._chunk_setitems(lchunk_coords, lchunk_selection, chunk_values,
zarr/core.py:1941: in _chunk_setitems
    self._chunk_delitems(empty_chunks.keys())
zarr/core.py:1950: in _chunk_delitems
    self.store.delitems(ckeys)
zarr/storage.py:1211: in delitems
    self.map.delitems(nkeys)
/usr/lib/python3/dist-packages/fsspec/mapping.py:114: in delitems
    self.fs.rm([self._key_to_str(k) for k in keys])
/usr/lib/python3/dist-packages/fsspec/implementations/local.py:105: in rm
    path = self._strip_protocol(path).rstrip("/")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'fsspec.implementations.local.LocalFileSystem'>, path = ['/tmp/tmpwvl8yc5e/1', '/tmp/tmpwvl8yc5e/2', '/tmp/tmpwvl8yc5e/3', '/tmp/tmpwvl8yc5e/4', '/tmp/tmpwvl8yc5e/5', '/tmp/tmpwvl8yc5e/6', ...]

    @classmethod
    def _strip_protocol(cls, path):
        path = stringify_path(path)
>       if path.startswith("file://"):
E       AttributeError: 'list' object has no attribute 'startswith'

/usr/lib/python3/dist-packages/fsspec/implementations/local.py:145: AttributeError
================================================================================================================= warnings summary =================================================================================================================
zarr/tests/test_creation.py: 1 warning
zarr/tests/test_storage.py: 14 warnings
  /tmp/zarr-python/zarr/n5.py:706: RuntimeWarning: Not all N5 implementations support blosc compression (yet). You might not be able to open the dataset with another N5 library.
    warnings.warn(

zarr/tests/test_indexing.py::test_slice_selection_uints
  /tmp/zarr-python/zarr/tests/test_indexing.py:1444: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
    assert arr[slice_sel].shape == (1, 6)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=============================================================================================================== slowest 10 durations ===============================================================================================================
11.99s call     zarr/tests/test_indexing.py::test_set_orthogonal_selection_3d
3.83s call     zarr/tests/test_core.py::TestArrayWithFSStorePartialRead::test_non_cont
1.97s call     zarr/tests/test_indexing.py::test_set_orthogonal_selection_2d
1.32s call     zarr/tests/test_core.py::TestArrayWithFSStorePartialRead::test_array_2d
0.89s call     zarr/tests/test_storage.py::test_format_compatibility
0.85s call     zarr/tests/test_indexing.py::test_get_orthogonal_selection_3d
0.81s call     zarr/tests/test_core.py::TestArrayWithSQLiteStore::test_iter
0.78s call     zarr/tests/test_core.py::TestArrayWithFSStoreNestedPartialRead::test_array_2d
0.76s call     zarr/tests/test_core.py::TestArrayWithSQLiteStore::test_islice
0.73s call     zarr/tests/test_core.py::TestArrayWithFSStoreNestedPartialRead::test_non_cont
============================================================================================================= short test summary info ==============================================================================================================
FAILED zarr/tests/test_core.py::TestArrayWithN5FSStore::test_nchunks_initialized - AttributeError: 'list' object has no attribute 'startswith'
================================================================================== 1 failed, 2176 passed, 453 skipped, 8 xfailed, 16 warnings in 82.69s (0:01:22) ==================================================================================
@d-v-b
Copy link
Collaborator

d-v-b commented Nov 15, 2021

Interesting! Something is a list when it shouldn't be... I can dig in :)

@d-v-b
Copy link
Collaborator

d-v-b commented Oct 18, 2024

I transferred this issue from zarr-python to n5py.

@d-v-b d-v-b transferred this issue from zarr-developers/zarr-python Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants