Skip to content

KeyError exception when trying to remove a group after opening an HDF5 file #116

Closed
@PierreRaybaut

Description

@PierreRaybaut

Describe the bug
When opening an HDF5 file containing signals or images and trying to remove a group with selecting the objects inside of it, a KeyError exception is raised.

To Reproduce
Steps to reproduce the behavior:

  1. Open an HDF5 file containing at least 2 objects in a group
  2. Click on a group containing at least 2 objects (without selecting anything else before)
  3. See KeyError exception

Traceback in console

Traceback (most recent call last):
  File "C:\Dev\Outils\WPy64-31150-DataLab\python-3.11.5.amd64\Lib\site-packages\guidata\qthelpers.py", line 336, in <lambda>
    action.triggered.connect(lambda checked=False: triggered())
                                                   ^^^^^^^^^^^
  File "C:\Dev\Projets\DataLab\cdl\core\gui\panel\base.py", line 554, in remove_object
    self.plothandler.remove_item(obj.uuid)
  File "C:\Dev\Projets\DataLab\cdl\core\gui\plothandler.py", line 147, in remove_item
    raise exc
  File "C:\Dev\Projets\DataLab\cdl\core\gui\plothandler.py", line 138, in remove_item
    item = self.__plotitems.pop(oid)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '166ab2c5-4d53-483b-ab5c-56094501bf7b'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions