diff --git a/scripts/debug_tool/tabs/mbdnet_tab.py b/scripts/debug_tool/tabs/mbdnet_tab.py index b987e2a0f27e2136b64b1472cda98b255a141905..165d59d067595a3ad70d4a746471c2c86bcf9219 100644 --- a/scripts/debug_tool/tabs/mbdnet_tab.py +++ b/scripts/debug_tool/tabs/mbdnet_tab.py @@ -327,10 +327,16 @@ class MBDNetTab(QWidget): if success: print("MBDNet process completed successfully") update_status_indicator(self.MBDNet_status, "Complete") - os.rename(os.path.join(self.input_dir, 'shifted_t.png'), os.path.join(self.input_dir, 'rgb.png')) - os.rename(os.path.join(self.input_dir, 'shifted_disparity.png'), os.path.join(self.input_dir, 'depth_e.png')) - os.rename(os.path.join(self.output_dir, 'scene_completed_prediction.mtl'), os.path.join(self.output_dir, 'Input_prediction_mesh.mtl')) - os.rename(os.path.join(self.output_dir, 'scene_completed_prediction.obj'), os.path.join(self.output_dir, 'Input_prediction_mesh.obj')) + try: + os.rename(os.path.join(self.input_dir, 'shifted_t.png'), os.path.join(self.input_dir, 'rgb.png')) + os.rename(os.path.join(self.input_dir, 'shifted_disparity.png'), os.path.join(self.input_dir, 'depth_e.png')) + os.rename(os.path.join(self.output_dir, 'scene_completed_prediction.mtl'), os.path.join(self.output_dir, 'Input_prediction_mesh.mtl')) + os.rename(os.path.join(self.output_dir, 'scene_completed_prediction.obj'), os.path.join(self.output_dir, 'Input_prediction_mesh.obj')) + except Exception as e: + print(f"Error renaming files: {str(e)}") + self.update_status(f"Error renaming files: {str(e)}") + self.update_status("Please make sure you are connected to the University Network/Gloabl Protect") + self.update_depth_preview() else: print("MBDNet process failed")