Closed pnewstein closed 2 weeks ago
@pnewstein thank you for the detailed write-up. I've been able to reproduce this issue on napari 0.4.19post1 but it seems to be fixed on main - are you able to install napari from main and confirm that?
@DragaDoncila You are correct. This issue is fixed on main. Thanks!
🐛 Bug Report
points.events.current_symbol
callbacks which modify that points layer's symbols raises the following exception when launching a widget plugin from the plugins menu:💡 Steps to Reproduce
💡 Expected Behavior
Points should be added with no exception being raised
🌎 Environment
napari: 0.4.19.post1 Platform: macOS-13.5.2-arm64-arm-64bit System: MacOS 13.5.2 Python: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:34:54) [Clang 16.0.6 ] Qt: 5.15.8 PyQt5: 5.15.9 NumPy: 1.26.4 SciPy: 1.13.0 Dask: 2024.4.2 VisPy: 0.14.2 magicgui: 0.8.2 superqt: 0.6.3 in-n-out: 0.2.0 app-model: 0.2.6 npe2: 0.7.5
OpenGL:
Screens:
Settings path:
💡 Additional Context
Interestingly, at napari/layers/points/points.py:606 (see included traceback),
type(self.symbol[-1]) == <class 'napari.utils._proxies.PublicOnlyProxy'>
whileself.symbol[-1].__class__ = <enum 'Symbol'>
This exception does not occur when the plugin is launched from python; this bug is specific to when the widget is launched through the plugins menu
When the plugin is launched from python:
type(self.symbol[-1])
andself.symbol[-1].__class__
are both<enum 'Symbol'>
This bug is a regression as it does not occur in napari 0.4.18