Skip to content

Commit abe207a

Browse files
committed
Improve error handling for csv when aborting
1 parent 4bdad2f commit abe207a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

napari_cellseg3d/code_plugins/plugin_model_training.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,10 @@ def on_finish(self):
949949

950950
self.log.print_and_log("Done")
951951
self.log.print_and_log("*" * 10)
952-
953-
self._make_csv()
952+
try:
953+
self._make_csv()
954+
except ValueError as e:
955+
logger.warning(f"Error while saving CSV report: {e}")
954956

955957
self.btn_start.setText("Start")
956958
[btn.setVisible(True) for btn in self.close_buttons]

0 commit comments

Comments
 (0)