mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
13 stars 6 forks source link

Saving to nexus: ERROR: Failed to save data. Error: None #2404

Open samtygier-stfc opened 4 hours ago

samtygier-stfc commented 4 hours ago

Summary

When saving to a nexus file I get an error

2024-11-15 16:13:38,205 [mantidimaging.gui.windows.main.presenter:L217] ERROR: Failed to save data. Error: None
2024-11-15 16:13:38,206 [mantidimaging.gui.mvp_base.presenter:L22] ERROR: Presenter error: Failed to save data. Error: No

Steps To Reproduce

Open the IMAT00010675 flower dataset File -> Save as Nexus File Choose output directory and a sample name Click save

Expected Behaviour

Data is saved, no error

Current Behaviour

A file is written, but there is an error message

Context

Current main.

Git bisect suggests the bad commit is 1b996d28f456794d0819dc0baf46036d164ac8c4 do_nexus_saving: switch to Dataset, check if has sample

Failure Logs

2024-11-15 16:13:38,171 [mantidimaging.core.utility.progress_reporting.progress:L78] DEBUG: Memory usage before execution: 21591000.0 KB, 21084.9609375 MB
2024-11-15 16:13:38,205 [mantidimaging.gui.windows.main.presenter:L217] ERROR: Failed to save data. Error: None
2024-11-15 16:13:38,206 [mantidimaging.gui.mvp_base.presenter:L22] ERROR: Presenter error: Failed to save data. Error: None
NoneType: None
NoneType: None
2024-11-15 16:13:38,206 [mantidimaging.gui.mvp_base.view:L46] ERROR: show_error_dialog(): Failed to save data. Error: None
samtygier-stfc commented 3 hours ago

Looks like this is because 1b996d28f456794d0819dc0baf46036d164ac8c4 dropped the return True from MainWindowModel.do_nexus_saving() on success. That means that the AsyncTaskDialogView gets None as the result which it considers to be an error condition.