Error message using SPM command spm_jobman

40 views (last 30 days)
Franziska Motka
Franziska Motka on 29 Jun 2022
Commented: Umar on 28 Jul 2024
Hi everyone,
I try to run an adapted preprocessing script (got it from an collegue) for a fMRI analysis. Unfortunatelly, I'm stuck on the command spm_jobman and get the following error message:
Error using spm_jobman>fill_run_job
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 s03_preprocessing_with_slice_timing_batch_NICCUE (line 79)
spm_jobman('run', matlabbatch);
It would be really helpful, if somebody could tell me what the problem is.
Thank you very much!
Franziska
  1 Comment
Umar
Umar on 28 Jul 2024

Hi Franziska,

The error message you are facing with the spm_jobman command in your preprocessing script is related to unresolved dependencies or incomplete module inputs. This error typically occurs when the script is unable to find all the necessary components to execute the job correctly.Verify that the matlabbatch variable, which contains the job specification, is correctly defined. Ensure that all required fields are filled with the appropriate values. You can inspect the matlabbatch variable to see if any fields are missing or incorrectly specified. To Resolve Dependencies, because it indicates that some modules or functions required by the job are missing or not properly linked. Review the job structure and make sure that all dependencies are correctly specified and accessible.Here is an example of how you can modify the code to potentially resolve the issue:

% Assuming matlabbatch is correctly defined before this point

try

    spm_jobman('run', matlabbatch);

catch ME

    disp(ME.message);
    rethrow(ME);

end

By encapsulating the spm_jobman call in a try-catch block, you can capture any errors that occur during job execution and display the error message for further investigation. If the error persists after checking the job structure and resolving dependencies, consider debugging the code step by step. You can use breakpoints, display variables, and inspect the execution flow to identify the root cause of the issue.

Sign in to comment.

Answers (1)

NN
NN on 25 Jul 2022
Hi,
Please provide the script for a better understanding of the error faced.
As per my knowledge, you can try running the following code for resolving the issue.
clear matlabbatch
Hope this helps.
Regards,
Narvik

Categories

Find more on Manage Products in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!