Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Fail gracefully if stimulus trace does not exist in _nwb_reader_BBP #88

Description

@lvsltz

_nwb_reader_BBP on BPE2 branch assumes current trace exists, but this is not always the case and fails with

warning: tag '2.0.0' is really '2.0' here
Traceback (most recent call last):
   File "/home/sol/Documents/git/BluePyEfe/bluepyefe/cell.py", line 108, in read_recordings
    for reader_data in self.reader(config_data, recording_reader):
  File "/home/sol/Documents/git/BluePyEfe/bluepyefe/cell.py", line 67, in reader
    return nwb_reader(config_data)
  File "/home/sol/Documents/git/BluePyEfe/bluepyefe/reader.py", line 331, in nwb_reader
    return _nwb_reader_BBP(content, target_protocols, in_data.get("repetition", None))
  File "/home/sol/Documents/git/BluePyEfe/bluepyefe/reader.py", line 297, in _nwb_reader_BBP
    current=content["stimulus"]["presentation"][key_current]["data"],
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/home/sol/miniconda3/envs/etype/lib/python3.10/site-packages/h5py/_hl/group.py", line 328, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'ics__IDRest__038' doesn't exist)"

A graceful exit should be provided instead.

Activity

  1. DrTaDa commented on Sep 2, 2022

    @DrTaDa
    Contributor

    Thank you for the report, I am on it.

  2. DrTaDa commented on Sep 2, 2022

    @DrTaDa
    Contributor

    @lvsltz Would you prefer if to crash or to skip this recording ?

  3. self-assigned this
    on Sep 2, 2022
  4. lvsltz commented on Sep 2, 2022

    @lvsltz
    ContributorAuthor

    I am not sure. It should behave in line with the other BPE scenarios when ton, toff and other important params are missing.

  5. DrTaDa commented on Sep 2, 2022

    @DrTaDa
    Contributor

    Could you try #89 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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