Skip to content
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

EmitterGroup object has no attribute contrast_limits errors #259

Open
K-Meech opened this issue Apr 23, 2024 · 1 comment · May be fixed by #260
Open

EmitterGroup object has no attribute contrast_limits errors #259

K-Meech opened this issue Apr 23, 2024 · 1 comment · May be fixed by #260
Labels
Bug Something isn't working

Comments

@K-Meech
Copy link

K-Meech commented Apr 23, 2024

With the latest napari-matplotlib and napari, 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"].data
mask = nuclei > 8266
viewer.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'
@dstansby dstansby added the Bug Something isn't working label May 3, 2024
@dstansby dstansby linked a pull request May 3, 2024 that will close this issue
@dstansby
Copy link
Member

dstansby commented May 3, 2024

Thanks for the report and easy reproduction instructions! I think I tracked it down and have a fix, just need to battle with tech debt since I last did a release...

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

Successfully merging a pull request may close this issue.

2 participants