Error- Index exceeds the number of array elements

Hello
I am new to Osprey and have been working for a while to get some data processed. Unfortunately, when I click to model/segment the data, I get the error message ‘Index exceeds the number of array elements. Index must not exceed 1’. This error is temperamental and only happens to some datasets, when other data gets processed fine. It also sometimes happens during modelling, and sometimes in segmenting. I was wondering if anyone knew the solution, as I feel as though I’ve done everything I can to mitigate this error! Feel free to ask for any more info if needed.

Thanks,
Stella

Screenshot 2022-08-19 at 15.01.19,

Hi @stella14,

Thanks for reaching out and using Osprey!

From what I can see in your error message, I have two possible solutions that you should consider first:

  1. The Osprey version you are using is quite old > 1 year since version 1.1. so I’d recommend downloading the most recent release (2.4.0) or the develop-branch (GitHub - schorschinho/osprey: All-in-one toolbox for processing of magnetic resonance spectroscopy data.)
  2. You may also want to update your spm12 at the same time

Let me know if this error persists

Best,
Helge

Hi @Helge,

Thanks for the speedy response! My apologies, I should’ve made it clear in the first message but I actually used an older version of Osprey to check that it wasn’t a bug that was causing the error, as I also received the same error using the latest version. I have just checked my spm12 and it seems that I also have the latest version. Therefore, I don’t think this is the issue.

Best,
Stella

Hi @stella14,

Ok - would you be able to share two datasets with me (one that works fine and one where it fails)?

Best,
Helge

Hi @stella14,

I’ve just added a bug fix to the develop branch. The error was related to the fact that DCM spectra a added with folder names only instead of full filenames.

You’ll have to delete all SPM output files in the image folder ‘c1…’ to ‘c5…’ as well as the SPM .mat file. Afterward everything should work as expected.

Best,
Helge

Hi Helge,

Thank you so much for fixing this so quickly! I followed the rest of your steps, but unfortunately I’m now getting a different error. Would you please be able to take a look at this for me? It also occurs during segmentation.

All the best,
Stella

Hi @stella14,

Did you download the most recent develop-branch (top right corner → Code → Download Zip)? Because the line of code your version is crahsing on doesn’t exist in the newest version.

Best,
Helge

Hi @Helge,

Sorry for the late response. Yes, I downloaded it but maybe there was an error with the files as once I did it again the code ran fine. Thank you so much for your help, it’s been very much appreciated!

Best,
Stella