help > Batch -- Preprocessing Error
Showing 1-10 of 10 posts
Display:
Results per page:
Jun 21, 2016  10:06 PM | Anna Xu
Batch -- Preprocessing Error
Hi, as I was running a MATLAB batch script to run CONN toolbox, I kept running into the following error during preprocessing (with spm12): 

Conversion Segment -> Old Segment
Item 'Source Image', field 'val': Number of matching files (0) less than required (1).
Conversion Normalise:Write -> Old Normalise:Write
Conversion Normalise:EstWrite -> Old Normalise:EstWrite
Item 'Source Image', field 'val': Number of matching files (0) less than required (1).
Item 'Images to Write', field 'val': Number of matching files (0) less than required (1).
{Error using spm_jobman>fill_run_job (line 474)
No executable modules, but still unresolved dependencies or incomplete module
inputs.
Error in spm_jobman (line 246)
sts = fill_run_job('run', cjob, varargin{3:end});
Error in conn_setup_wizard (line 186)
spm_jobman('run',matlabbatch);
Error in conn_batch (line 160)
conn_setup_wizard(OPTIONS);
Error in Taiji_Batch_062116_2 (line 257)
conn_batch(batch);
}
474 error('spm:spm_jobman:jobNotFilled', 'No executable modules, but still unresolved dependencies or incomplete module inputs.');
K>>

Does anyone have any insights on what might be going on and how to fix this?
Thank you!
Jun 22, 2016  12:06 AM | Alfonso Nieto-Castanon - Boston University
RE: Batch -- Preprocessing Error
Hi Anna,

If, before seeing that error message, you got a number of warning messages saying something about a possibly discontinued or obsolete preprocessing pipeline, then this error is probably related to your scripts trying to use the old "batch.New" syntax for preprocessing (which is no longer supported and only worked originally with SPM8). If that is the case you should simply modify the scripts to use instead the newer "batch.Setup.Preprocessing" syntax which will work with SPM8 or SPM12 (see "help conn_batch" for additional details). Let me know if that seems to fix this issue and/or send me your script to take a quick look to see if I can identify the issue there.

Best
Alfonso
 
Originally posted by Anna Xu:
Hi, as I was running a MATLAB batch script to run CONN toolbox, I kept running into the following error during preprocessing (with spm12): 

Conversion Segment -> Old Segment
Item 'Source Image', field 'val': Number of matching files (0) less than required (1).
Conversion Normalise:Write -> Old Normalise:Write
Conversion Normalise:EstWrite -> Old Normalise:EstWrite
Item 'Source Image', field 'val': Number of matching files (0) less than required (1).
Item 'Images to Write', field 'val': Number of matching files (0) less than required (1).
{Error using spm_jobman>fill_run_job (line 474)
No executable modules, but still unresolved dependencies or incomplete module
inputs.
Error in spm_jobman (line 246)
sts = fill_run_job('run', cjob, varargin{3:end});
Error in conn_setup_wizard (line 186)
spm_jobman('run',matlabbatch);
Error in conn_batch (line 160)
conn_setup_wizard(OPTIONS);
Error in Taiji_Batch_062116_2 (line 257)
conn_batch(batch);
}
474 error('spm:spm_jobman:jobNotFilled', 'No executable modules, but still unresolved dependencies or incomplete module inputs.');
K>>

Does anyone have any insights on what might be going on and how to fix this?
Thank you!
Jun 22, 2016  05:06 PM | Anna Xu
RE: Batch -- Preprocessing Error
Hi Alfonso,

Thank you for your prompt reply. Hoping that I am on the same page as you, I have edited the script by deleting the batch.New sections of my script and have replaced them with batch.Setup syntax (similar to the script in conn_batch_workshop_nyudataset.m from the Downloads link). However, I am now getting a new error message:

{ Undefined function 'spm_matlab_version_chk' for input arguments of type 'char'.
Error in conn_process>savefields (line 2954)
if spm_matlab_version_chk('7') >= 0
Error in conn_process (line 143)
savefields(conn_prepend('',deblank(CONN_x.Setup.structural{nsub}{1}),'_seg_sn.mat'),sn);
Error in conn_process (line 11)
case 'setup', disp(['CONN: RUNNING SETUP STEP']);
conn_process([0:5]);
Error in conn_batch (line 326)
conn_process Setup;

Do you happen to know the best way to resolve this problem?
Thank you!
Jun 22, 2016  06:06 PM | Alfonso Nieto-Castanon - Boston University
RE: Batch -- Preprocessing Error
Hi Anna,

Sorry I did not notice that, you should also update to the latest CONN release for this to work (currently 2016b, you seem to be using some of the earlier 2014 CONN releases, and, despite the name, SPM12 was only released around the end of 2014 so your CONN version does not support most SPM12 functionality).

Best
Alfonso
Originally posted by Anna Xu:
Hi Alfonso,

Thank you for your prompt reply. Hoping that I am on the same page as you, I have edited the script by deleting the batch.New sections of my script and have replaced them with batch.Setup syntax (similar to the script in conn_batch_workshop_nyudataset.m from the Downloads link). However, I am now getting a new error message:

{ Undefined function 'spm_matlab_version_chk' for input arguments of type 'char'.
Error in conn_process>savefields (line 2954)
if spm_matlab_version_chk('7') >= 0
Error in conn_process (line 143)
savefields(conn_prepend('',deblank(CONN_x.Setup.structural{nsub}{1}),'_seg_sn.mat'),sn);
Error in conn_process (line 11)
case 'setup', disp(['CONN: RUNNING SETUP STEP']);
conn_process([0:5]);
Error in conn_batch (line 326)
conn_process Setup;

Do you happen to know the best way to resolve this problem?
Thank you!
Jun 28, 2016  03:06 AM | Anna Xu
RE: Batch -- Preprocessing Error
Hi Alfonso,

Thank you for your help! I've downloaded the latest CONN release and rewrote my script using the nyudataset script as an example for analyzing between-session differences. However, while preprocessing seems to be working for the most part, I am now running into a new error. After a new analysis mask file (art_mask.img) was saved to the the first subject's 1st session folder, I'm running into an error message that says the following:

" {Error using figure
This functionality is no longer supported under the -nojvm startup option.
For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes.
To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in matlab.hg.internal.openfigLegacy (line 120)
figure(fig(i));
Error in gui_mainfcn>local_openfig (line 286)
gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible);
Error in gui_mainfcn (line 233)
gui_hFigure = local_openfig(gui_State.gui_Name,
'reuse',gui_Visible);
Error in art (line 143)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
Error in conn_art (line 8)
[varargout{1:nargout}]=art(varargin{:});
Error in conn_setup_preproc (line 1066)
h=conn_art('sess_file',matlabbatch{n}.art);
Error in conn_process (line 23)
case 'setup_preprocessing', disp(['CONN: RUNNING
SETUP.PREPROCESSING STEP']);
conn_setup_preproc(varargin{:});
Error in conn_batch (line 670)
conn_process('setup_preprocessing',steps,'subjects',SUBJECTS,OPTIONS{:});
Error in practice2 (line 113)
conn_batch(batch);
}
>> "

Would it be possible for you to take a quick look at my script to see if maybe there were errors in the script that may be causing this/if you have any suggestions on resolving this issue?

Thank you so much!
Attachment: practice2.m
Jun 28, 2016  05:06 AM | Alfonso Nieto-Castanon - Boston University
RE: Batch -- Preprocessing Error
Hi Anna,

The error seems to be related to having started your matlab session using the -nojvm flag. If you are running Matlab from a terminal with no graphic display capabilities, instead of starting Matlab using something like:

  matlab -nojvm

use the following instead: 

  matlab -nodisplay -nodesktop -nosplash

Let me know if you run into any issues
Alfonso
Originally posted by Anna Xu:
Hi Alfonso,

Thank you for your help! I've downloaded the latest CONN release and rewrote my script using the nyudataset script as an example for analyzing between-session differences. However, while preprocessing seems to be working for the most part, I am now running into a new error. After a new analysis mask file (art_mask.img) was saved to the the first subject's 1st session folder, I'm running into an error message that says the following:

" {Error using figure
This functionality is no longer supported under the -nojvm startup option.
For
more information, see "Changes to -nojvm Startup Option" in the MATLAB Release
Notes.
To view the release note in your system browser, run
web('http://www.mathworks.com/help/matlab/release-notes.html#btsurqv-6',
'-browser').

Error in matlab.hg.internal.openfigLegacy (line 120)
figure(fig(i));
Error in gui_mainfcn>local_openfig (line 286)
gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible);
Error in gui_mainfcn (line 233)
gui_hFigure = local_openfig(gui_State.gui_Name,
'reuse',gui_Visible);
Error in art (line 143)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
Error in conn_art (line 8)
[varargout{1:nargout}]=art(varargin{:});
Error in conn_setup_preproc (line 1066)
h=conn_art('sess_file',matlabbatch{n}.art);
Error in conn_process (line 23)
case 'setup_preprocessing', disp(['CONN: RUNNING
SETUP.PREPROCESSING STEP']);
conn_setup_preproc(varargin{:});
Error in conn_batch (line 670)
conn_process('setup_preprocessing',steps,'subjects',SUBJECTS,OPTIONS{:});
Error in practice2 (line 113)
conn_batch(batch);
}
>> "

Would it be possible for you to take a quick look at my script to see if maybe there were errors in the script that may be causing this/if you have any suggestions on resolving this issue?

Thank you so much!
Jun 29, 2016  08:06 PM | Anna Xu
RE: Batch -- Preprocessing Error
Hi Alfonso, thank you so much for your help! Everything seems to be running well, but I am now getting the following error message when I run the batch script. What is the best way to resolve this? Thanks!

Step 5/5: Preparing second-level ROI analyses
16.7%
(Subject 1 Condition 1)33.3%
(Subject 2 Condition 1)50.0%
(Subject 1 Condition 2)66.7%
(Subject 2 Condition 2)83.3%
(Subject 1 Condition 3)100.0%
(Subject 2 Condition 3)

ERROR DESCRIPTION:
Error using figure
Width and height must be > 0
Error in conn (line 86)
CONN_h.screen.hfig=figure('units','pixels','position',[0*72+1,h0(2)-max(minheight,.5*h0(1))-48,h0(1)-0*72-1,max(minheight,.5*h0(1))],'color',CONN_gui.backgroundcolor,'doublebuffer','on','tag',connversion{1},'name',tname,'numbertitle','off','menubar','none','resize','on','colormap',CONN_h.screen.colormap,'closerequestfcn',@conn_closerequestfcn,'deletefcn',@conn_deletefcn,'resizefcn',@conn_resizefcn,'interruptible','off');
Error in practice2 (line 94)
conn
CONN v.16.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2014a
storage: 55154.4Gb available
ERROR DESCRIPTION:
Reference to non-existent field 'menus'.
Error in conn (line 4584)
state=find(conn_menumanager(CONN_h.menus.m_results_03,'state'));
Error in practice2 (line 96)
conn gui_results
CONN v.16.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2014a
storage: 55154.4Gb available
Jul 1, 2016  02:07 AM | Alfonso Nieto-Castanon - Boston University
RE: Batch -- Preprocessing Error
Hi Anna,

That seems perfectly fine, all of the analyses seem to have finished without a problem, and the error that you are getting is simply because your script includes the line at the end:

  conn gui_results


which is intended to, after all analyses are done, launch the CONN gui to let you look at those results. Since you are running this from a terminal-only window (with no graphic capabilities), the error indicates that CONN gui is unable to start.

Hope this helps
Alfonso

Originally posted by Anna Xu:
Hi Alfonso, thank you so much for your help! Everything seems to be running well, but I am now getting the following error message when I run the batch script. What is the best way to resolve this? Thanks!

Step 5/5: Preparing second-level ROI analyses
16.7%
(Subject 1 Condition 1)33.3%
(Subject 2 Condition 1)50.0%
(Subject 1 Condition 2)66.7%
(Subject 2 Condition 2)83.3%
(Subject 1 Condition 3)100.0%
(Subject 2 Condition 3)

ERROR DESCRIPTION:
Error using figure
Width and height must be > 0
Error in conn (line 86)
CONN_h.screen.hfig=figure('units','pixels','position',[0*72+1,h0(2)-max(minheight,.5*h0(1))-48,h0(1)-0*72-1,max(minheight,.5*h0(1))],'color',CONN_gui.backgroundcolor,'doublebuffer','on','tag',connversion{1},'name',tname,'numbertitle','off','menubar','none','resize','on','colormap',CONN_h.screen.colormap,'closerequestfcn',@conn_closerequestfcn,'deletefcn',@conn_deletefcn,'resizefcn',@conn_resizefcn,'interruptible','off');
Error in practice2 (line 94)
conn
CONN v.16.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2014a
storage: 55154.4Gb available
ERROR DESCRIPTION:
Reference to non-existent field 'menus'.
Error in conn (line 4584)
state=find(conn_menumanager(CONN_h.menus.m_results_03,'state'));
Error in practice2 (line 96)
conn gui_results
CONN v.16.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2014a
storage: 55154.4Gb available
Aug 24, 2016  01:08 PM | Alina inu
RE: Batch -- Preprocessing Error
Hello,

I am new to SPM and I am encountering the same problem and I can't solve it.

I am trying to run this:
matlabbatch{1}.spm.spatial.preproc.channel.vols = {'C:\Program Files\MATLAB\Sub_16UNI_INV2masked40.nii.gz,1'};
spm('defaults', 'fmri');
spm_jobman('initcfg');
disp('-> SPM12 defaults have been loaded.');

And I have the following errors:
Error using spm_jobman>fill_run_job (line 461)
No executable modules, but still unresolved dependencies or incomplete module inputs.

Error in spm_jobman (line 247)
sts = fill_run_job('run', cjob, varargin{3:end});
Error in S016_SPM_Bias_Correct (line 44)
spm_jobman('run', matlabbatch);

I saw a  suggestion using : spm_jobman('interactive','matlabbatch')
However, when I am doing this I have another error:
Warning: Unknown extension: 'matlabbatch'
> In spm_jobman>load_jobs (line 334)
In spm_jobman (line 143)
Warning: No batch job found in 'matlabbatch'
> In spm_jobman>load_jobs (line 343)
In spm_jobman (line 143)
Error using spm_jobman (line 199)
No valid job. 


Could you please help me?

Best wishes,
Alina
Mar 26, 2017  10:03 AM | Jeremy Guillon - Brain and Spine Institute (ICM), Paris, France
RE: Batch -- Preprocessing Error
Hi!

I had the exact same error generated while running SPM12 from the nipype library in python and it was simply because my inputs were *.nii.gz files and not *.nii files...

Hopping SPM teams will improve that behavior in the future by throwing a more meaningful exception!

Best,

GJ