Skip to content

When selecting multiple images just after opening an HDF5 file, the "View in a new window" feature does not work (KeyError exception) #159

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

Closed
PierreRaybaut opened this issue Apr 7, 2025 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@PierreRaybaut
Copy link
Contributor

Example of traceback in the internal console:

Traceback (most recent call last):
  File "\guidata\guidata\qthelpers.py", line 336, in <lambda>
    action.triggered.connect(lambda checked=False: triggered())
                                                   ^^^^^^^^^^^
  File "\DataLab\cdl\core\gui\panel\base.py", line 1110, in open_separate_view
    self.add_plot_items_to_dialog(dlg, oids)
  File "\DataLab\cdl\core\gui\panel\base.py", line 1076, in add_plot_items_to_dialog
    item = obj.make_item(update_from=self.plothandler[obj.uuid])
                                     ~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "\DataLab\cdl\core\gui\plothandler.py", line 105, in __getitem__
    raise exc
  File "\DataLab\cdl\core\gui\plothandler.py", line 96, in __getitem__
    return self.__plotitems[oid]
           ~~~~~~~~~~~~~~~~^^^^^
KeyError: 'c39e12c3-8917-4d36-9ddd-fb539b7623c0'

This is happening because, when opening an HDF5 file and selecting multiple images, image plot items have not yet been constructed except the last image selected (due to the optimization that aims at constructing only the plot items that are visible).

@PierreRaybaut PierreRaybaut added the bug Something isn't working label Apr 7, 2025
@PierreRaybaut PierreRaybaut added this to the V0.19.1 milestone Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant