Skip to content

numpy.bool not accepted as bool type in setChecked() #265

@deuterium33

Description

@deuterium33

Describe the bug
When opening images from an HDF5 file (File/Open HDF5 files...) and visualizing in the image panel, the console shouts:

CRITICAL - Unhandled exception
Traceback (most recent call last):
  File "C:\Users\mathi\anaconda3\envs\datalab\Lib\site-packages\plotpy\plot\manager.py", line 459, in update_tools_status
    tool.update_status(plot)
  File "C:\Users\mathi\anaconda3\envs\datalab\Lib\site-packages\plotpy\tools\image.py", line 718, in update_status
    self.action.setChecked(state)
TypeError: setChecked(self, a0: bool): argument 1 has unexpected type 'numpy.bool'

To Reproduce

  1. Generate random images in DataLab, from the Create menu for example.
  2. Save to an hdf5 file
  3. Open the hdf5 file in a clean DataLab workspace
  4. Select an image in the image panel
  5. See error on the console below (screenshot)

Screenshots

Image

Installation information

  • Conda environment, Python 3.11
  • DataLab v1.0.1

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