- Notifications
You must be signed in to change notification settings - Fork22
Closed
Description
With the latestnapari-matplotlib
andnapari
, I'm seeing some odd errors while the histogram is open:AttributeError: 'EmitterGroup' object has no attribute 'contrast_limits'
. This error doesn't appear when running the same commands below without the histogram open.
To reproduce
- File > Open Sample > napari builtins > Cells (3D + 2Ch)
- Plugins > napari matplotlib > Histogram
- Open napari python console
- Run commands:
nuclei = viewer.layers["nuclei"].datamask = nuclei > 8266viewer.add_labels(mask)
Error
File ~\anaconda3\envs\napari-env-matplot-testing\lib\site-packages\napari_matplotlib\histogram.py:59, in HistogramWidget.on_update_layers(self) 57 super().on_update_layers() 58 for layer in self.viewer.layers:---> 59 layer.events.contrast_limits.connect(self._update_contrast_lims)File ~\anaconda3\envs\napari-env-matplot-testing\lib\site-packages\napari\utils\events\event.py:978, in EmitterGroup.__getattr__(self, name) 977 def __getattr__(self, name) -> EventEmitter:--> 978 return object.__getattribute__(self, name)AttributeError: 'EmitterGroup' object has no attribute 'contrast_limits'