Utilities/file_io/automated_files_tasks.py
def convert_tdms_to_mp4(self, n_processes=1):
        """
            Keeps calling video conversion tool, regardless of what happens
        """
        try:
            sort_mantis_files()
        except:
            pass

        tcvt = self.get_list_uncoverted_tdms_videos()
        toconvert = [os.path.join(self.videos_fld, t) for t in tcvt]
        # while True:
        if n_processes> 1:
            in_process = None
            try:
                for f in toconvert:
                    in_process = f
                    VideoConverter(os.path.join(self.videos_fld, f), extract_framesize=True)
                print('All files converted, yay!')

                editor = Editor()
                editor.concated_tdms_to_mp4_clips(fld)
                print('All clips joined, yay!')

                # break
            except: # ignore exception and try again
                if in_process is not None:
                    pass # ! clear unfinished business 
                print('Failed again, trying again..\n\n')
        else:
            for f in toconvert:
                try:
                    VideoConverter(os.path.join(self.videos_fld, f), extract_framesize=True)
                except:
                    continue

            Keeps calling video conversion tool, regardless of what happens
        
Keeps calling video conversion tool, regardless of what happens
Keeps calling video conversion tool regardless of what happens
def convert_tdms_to_mp4(self, n_processes=1):
        try:
            sort_mantis_files()
        except:
            pass
        tcvt = self.get_list_uncoverted_tdms_videos()
        toconvert = [os.path.join(self.videos_fld, t) for t in tcvt]
        if n_processes> 1:
            in_process = None
            try:
                for f in toconvert:
                    in_process = f
                    VideoConverter(os.path.join(self.videos_fld, f), extract_framesize=True)
                print('All files converted, yay!')
                editor = Editor()
                editor.concated_tdms_to_mp4_clips(fld)
                print('All clips joined, yay!')
            except: 
                if in_process is not None:
                    pass 
                print('Failed again, trying again..\n\n')
        else:
            for f in toconvert:
                try:
                    VideoConverter(os.path.join(self.videos_fld, f), extract_framesize=True)
                except:
                    continue
def convert_tdms_to_mp4 ( self , n_processes = 1 ) : try : sort_mantis_files ( ) except : pass tcvt = self . get_list_uncoverted_tdms_videos ( ) toconvert = [ os . path . join ( self . videos_fld , t ) for t in tcvt ] if n_processes > 1 : in_process = None try : for f in toconvert : in_process = f VideoConverter ( os . path . join ( self . videos_fld , f ) , extract_framesize = True ) print ( 'All files converted, yay!' ) editor = Editor ( ) editor . concated_tdms_to_mp4_clips ( fld ) print ( 'All clips joined, yay!' ) except : if in_process is not None : pass print ( 'Failed again, trying again..\n\n' ) else : for f in toconvert : try : VideoConverter ( os . path . join ( self . videos_fld , f ) , extract_framesize = True ) except : continue
Keeps calling video conversion tool, regardless of what happens
Keeps calling video conversion tool regardless of what happens
"""
            Keeps calling video conversion tool, regardless of what happens
        """ # while True: # break # ignore exception and try again # ! clear unfinished business 
self
n_processes