mantidproject / mantid

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

Sliceviewer does not handle replacing the workspace with a workspace group #29259

Closed NickDraper closed 3 years ago

NickDraper commented 4 years ago

Bit more niche this one

Expected behavior

The sliceviewer should close cleanly (with perhaps an explanatory log message or pop up.

Actual behavior

lots of angry red log messages, and the sliceviewer stays on the lat workspace

Some "CCR_head" log data is invalid!
Some "CCR_heater" log data is invalid!
Some "Cycle" log data is invalid!
Some "Jaw_East" log data is invalid!
Some "Jaw_Horiz_Gap" log data is invalid!
Some "Jaw_North" log data is invalid!
Some "Jaw_South" log data is invalid!
Some "Jaw_Vert_Centre" log data is invalid!
Some "Jaw_Vert_Gap" log data is invalid!
Some "Jaw_West" log data is invalid!
Some "RB" log data is invalid!
Some "Stick_heater" log data is invalid!
Some "T_fixed" log data is invalid!
Some "T_float" log data is invalid!
Some "CCR_head" log data is invalid!
Some "CCR_heater" log data is invalid!
Some "Cycle" log data is invalid!
Some "Jaw_East" log data is invalid!
Some "Jaw_Horiz_Gap" log data is invalid!
Some "Jaw_North" log data is invalid!
Some "Jaw_South" log data is invalid!
Some "Jaw_Vert_Centre" log data is invalid!
Some "Jaw_Vert_Gap" log data is invalid!
Some "Jaw_West" log data is invalid!
Some "RB" log data is invalid!
Some "Stick_heater" log data is invalid!
Some "T_fixed" log data is invalid!
Some "T_float" log data is invalid!
Load successful, Duration 3.68 seconds
Scale started
Scale successful, Duration 0.02 seconds
Scale started
Scale successful, Duration 0.01 seconds
Scale started
Scale successful, Duration 0.01 seconds
Scale started
Scale successful, Duration 0.01 seconds
Scale started
Scale successful, Duration 0.01 seconds
Scale started
Scale successful, Duration 0.01 seconds
Load started
Invalid ISO8601 date 2009-07- 8T10:23:50 corrected to 2009-07-08T10:23:50
Invalid ISO8601 date 2009-07- 8T10:40:18 corrected to 2009-07-08T10:40:18
In Instrument::getSource(). No source has been set.
Invalid ISO8601 date 2009-07- 8T10:23:50 corrected to 2009-07-08T10:23:50
Invalid ISO8601 date 2009-07- 8T10:23:50 corrected to 2009-07-08T10:23:50
Invalid ISO8601 date 2009-07- 8T10:23:50 corrected to 2009-07-08T10:23:50
Error occurred in handler:
Traceback (most recent call last):
  File "E:\MantidNightlyInstall\bin\workbench\plotting\figuremanager.py", line 51, in wrapper
    func(*args, **kwargs)
  File "E:\MantidNightlyInstall\bin\workbench\plotting\figuremanager.py", line 124, in replaceHandle
    redraw_this = ax.replace_workspace_artists(workspace)
  File "E:\MantidNightlyInstall\bin\mantid\plots\mantidaxes.py", line 425, in replace_workspace_artists
    is_empty_list = [workspace_artist.replace_data(workspace) for workspace_artist in artist_info]
  File "E:\MantidNightlyInstall\bin\mantid\plots\mantidaxes.py", line 425, in <listcomp>
    is_empty_list = [workspace_artist.replace_data(workspace) for workspace_artist in artist_info]
  File "E:\MantidNightlyInstall\bin\mantid\plots\mantidaxes.py", line 1540, in replace_data
    new_artists = self._data_replace_cb(self._artists, workspace)
  File "E:\MantidNightlyInstall\bin\mantid\plots\mantidaxes.py", line 601, in _data_update
    x, y, _, _ = axesfunctions._plot_impl(self, workspace, args, kwargs)
  File "E:\MantidNightlyInstall\bin\mantid\plots\axesfunctions.py", line 150, in _plot_impl
    x, y, _, _, indices, axis, kwargs = _get_data_for_plot(axes, workspace, kwargs)
  File "E:\MantidNightlyInstall\bin\mantid\plots\axesfunctions.py", line 113, in _get_data_for_plot
    workspace_index, distribution, kwargs = get_wksp_index_dist_and_label(
  File "E:\MantidNightlyInstall\bin\mantid\plots\datafunctions.py", line 193, in get_wksp_index_dist_and_label
    workspace_index, spectrum_number, kwargs = _get_wksp_index_and_spec_num(workspace, axis, **kwargs)
  File "E:\MantidNightlyInstall\bin\mantid\plots\datafunctions.py", line 240, in _get_wksp_index_and_spec_num
    workspace_index = workspace.getIndexFromSpectrumNumber(int(spectrum_number))
AttributeError: 'WorkspaceGroup' object has no attribute

Steps to reproduce the behavior

  1. Load a workspace
  2. show sliveviewer
  3. Load another file into the same workspace name, but this time a multiperiod file, so it creates a workspace group

Platforms affected

All

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in 6 months. It will be closed in 7 days if no further activity occurs. Allowing issues to close as stale helps us filter out issues which can wait for future development time. All issues closed by stale bot act like normal issues; they can be searched for, commented on or reopened at any point. If you'd like a closed stale issue to be considered, feel free to either re-open the issue directly or contact a developer. To extend the lifetime of an issue please comment below, it helps us see that this is still affecting you and you want it fixed in the near-future. Extending the lifetime of an issue may cause the development team to prioritise it over other issues, which may be closed as stale instead.

stale[bot] commented 3 years ago

This issue has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it.