JaneliaSciComp/G4_Display_Tools

Saving metadata at the end of an Conductor run sometimes has a file creation error

floesche opened this issue · 1 comments

This error was reported on slack earlier:

Error using save
Cannot create 'metadata.mat' because 'C:\matlabroot\opto_motion1_HMS_2023\tests for dry run\MOST UPDATED 6-20 COOL
PROTOCOL!\06_22_2023\CTI_CsChrimson-14_30_02' does not exist.

Error in G4_conductor_controller/create_metadata_file (line 1212)
            save(metadata_save_filename, 'metadata');

Error in G4_conductor_controller/run (line 765)
            self.create_metadata_file();

Error in G4_conductor_view/run_exp (line 619)
            self.con.run();

Error in G4_conductor_view>@(varargin)self.run_exp(varargin{:}) (line 139)
                'units', 'pixels', 'Position', [15, self.fig_size(4)- 305, 115, 85],'Callback', @self.run_exp);
 
Error while evaluating UIControl Callback.

Checking for the directory (and creating it when it doesn't exist) fixes the immediate problem.

Commit 48efc1e has an example. Currently patched at the behavior setup