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

silx.gui.plot.tools.profile: Fixed profile error when plot item is None #4196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Nov 18, 2024

Checklist:


ProfileRoiMixIn._setPlotItem did not support None, which can lead to errors:

ERROR:silx.app.view.main:<class 'TypeError'> cannot create weak reference to 'NoneType' object   File "silx/gui/plot/tools/profile/manager.py", line 772, in __activeImageChanged
    self.setPlotItem(item)
  File "silx/gui/plot/tools/profile/manager.py", line 942, in setPlotItem
    self.requestUpdateAllProfile()
  File "silx/gui/plot/tools/profile/manager.py", line 844, in requestUpdateAllProfile
    self.requestUpdateProfile(roi)
  File "silx/gui/plot/tools/profile/manager.py", line 870, in requestUpdateProfile
    profileRoi._setPlotItem(None)
  File "silx/gui/plot/tools/profile/core.py", line 129, in _setPlotItem
    self.__plotItem = weakref.ref(plotItem)
                      ^^^^^^^^^^^^^^^^^^^^^

@t20100 t20100 added this to the Next release milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant