mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
211 stars 123 forks source link

RenameWS MuonAnalysis Error #28767

Closed DanielMurphy22 closed 3 years ago

DanielMurphy22 commented 4 years ago

Original reporter: James Lord

Steps to reproduce the behavior

Error Output

Error occurred in handler:
Traceback (most recent call last):
  File "/Applications/MantidWorkbench5_0.app/Contents/scripts/Muon/GUI/Common/contexts/muon_context_ADS_observer.py", line 21, in wrapper
    func(*args, **kwargs)
  File "/Applications/MantidWorkbench5_0.app/Contents/scripts/Muon/GUI/Common/contexts/muon_context_ADS_observer.py", line 59, in renameHandle
    self.delete_callback(old_workspace_name)
  File "/Applications/MantidWorkbench5_0.app/Contents/scripts/Muon/GUI/Common/contexts/muon_context.py", line 392, in remove_workspace
    self.deleted_plots_notifier.notify_subscribers(workspace)
  File "/Applications/MantidWorkbench5_0.app/Contents/MacOS/mantidqt/utils/observer_pattern.py", line 56, in notify_subscribers
    self.thread_safe_update_call(arg, **kwargs)
  File "/Applications/MantidWorkbench5_0.app/Contents/MacOS/mantidqt/utils/qt/qappthreadcall.py", line 54, in __call__
    reraise(*self._exc_info)
  File "/Applications/MantidWorkbench5_0.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/six.py", line 703, in reraise
    raise value
  File "/Applications/MantidWorkbench5_0.app/Contents/MacOS/mantidqt/utils/qt/qappthreadcall.py", line 64, in on_call
    self.callee(*self._args, **self._kwargs)
  File "/Applications/MantidWorkbench5_0.app/Contents/MacOS/mantidqt/utils/observer_pattern.py", line 60, in _notify_subscribers_impl
    observer.update(self, arg, **kwargs)
  File "/Applications/MantidWorkbench5_0.app/Contents/MacOS/mantidqt/utils/observer_pattern.py", line 92, in update
    self.callback(arg)
  File "/Applications/MantidWorkbench5_0.app/Contents/scripts/Muon/GUI/Common/plotting_widget/plotting_widget_presenter.py", line 128, in handle_workspace_deleted_from_ads
    if workspace.name() in self._model.plotted_workspaces:
AttributeError: 'str' object has no attribute 'name'

Platforms affected

Workbench 5.0 and current nightly

DanielMurphy22 commented 3 years ago

This was still broken in release 6.0, but seems to not be a problem on master currently, possibly due to changes related to the ADS observer.