Skip to content

error when trying to read data using LINDI #105

@bendichter

Description

@bendichter
Accessing position data...
^CTraceback (most recent call last):
  File "/Users/bdichter/dev/dandiset_notebooks/scratch/dandisets/000582/2025-03-25-2/tmp_scripts/access_dandi_subset.py", line 51, in <module>
    pos_data = spatial_series.data[::stride]
               ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/lindi/LindiH5pyFile/LindiH5pyDataset.py", line 170, in __getitem__
    return self._get_item_for_zarr(self._zarr_array, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/lindi/LindiH5pyFile/LindiH5pyDataset.py", line 219, in _get_item_for_zarr
    return decode_references(zarr_array[selection])
                             ~~~~~~~~~~^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/zarr/core.py", line 798, in __getitem__
    result = self.get_basic_selection(pure_selection, fields=fields)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/zarr/core.py", line 924, in get_basic_selection
    return self._get_basic_selection_nd(selection=selection, out=out, fields=fields)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/zarr/core.py", line 966, in _get_basic_selection_nd
    return self._get_selection(indexer=indexer, out=out, fields=fields)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/zarr/core.py", line 1341, in _get_selection
    self._chunk_getitems(
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/zarr/core.py", line 2182, in _chunk_getitems
    cdatas = self.chunk_store.getitems(ckeys, contexts=contexts)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/zarr/_storage/store.py", line 179, in getitems
    return {k: self[k] for k in keys if k in self}
               ~~~~^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/lindi/LindiH5pyFile/LindiReferenceFileSystemStore.py", line 138, in __getitem__
    val = self._get_helper(key)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/lindi/LindiH5pyFile/LindiReferenceFileSystemStore.py", line 199, in _get_helper
    val = _read_bytes_from_url_or_path(url_or_path, offset, length)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/lindi/LindiH5pyFile/LindiReferenceFileSystemStore.py", line 332, in _read_bytes_from_url_or_path
    response = requests.get(url_resolved, headers=headers)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/urllib3/connectionpool.py", line 534, in _make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/site-packages/urllib3/connection.py", line 516, in getresponse
    httplib_response = super().getresponse()
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Users/bdichter/miniconda3/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/ssl.py", line 1251, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdichter/miniconda3/lib/python3.12/ssl.py", line 1103, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
sys:1: DeprecationWarning: Call to deprecated function (or staticmethod) _destroy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions