Index is out of bounds error!



Heya :slight_smile:

I am new at CP, but very excited and pleased so far!
I have built a pipeline that seems to work ok, up to the IdentifyTetriaryObjects, after which I want to do different measurements. As I start with MeasureObjectIntensity, an Error pops up reading: “Error while processing MeasureObjectIntensity: index 227 is out of bounds for axis 0 with size 227”
(I am using CP 3.1.5 on Windows)

A1_1_15.08.18-b - Copy.cpproj (613.5 KB)

What do I do??!!

Thanking you, in advance.


Help please with 'Index out of bounds error'

Hi Sophia,

I’m having this issue too. I think it’s a known bug:

Hopefully someone will solve the problem soon. For now, you could maybe try an earlier version of CellProfiler? Does anyone know if there’s a version without this issue?
For me, it only happens on some images (I don’t know what’s special about those images!) so currently I’m just excluding those ones from my analysis.

Good luck!


Thank you for taking the time to reply, Franscesca! It’s good to know I’m not the only one, and indeed I found more comments (@[shaney314]).
It’s not giving me an output of MeasureObjectIntensity at all. I hope there is an easy solution, too. Was quite keen to progress :slight_smile:

Best wishes,


Well, I am getting the same error on all my images…just the number of the index changes… (?!) :confused:

Thank you,



I’m also having the same problem with CellProfiler 3.1.5 in a Mac.
Some images don’t give a problem but some do. More strangely I was running the pipeline with these images and didn’t get this error. I have attached the pipeline and some of the images that are giving problem. I’m using the bright field image to contour the cell limits
.kassie-version13.cpproj (190.9 KB)



Yes, I had missed the beginning of this conversation when I reposted earlier today as an updated comment from a past incident. In that case, David Logan was able to solve the issue with some kind of reformatting of the figures, but this was definitely a work-around and they were able to fix it in an update.

I am pretty sure the numbers change because CP can identify the primary objects for an image but then forgets how to count them (beginning with 0 instead of 1), so they are different for every image. So in the case you cite in the beginning, the 227 objects it found are numbered from 0 to 226.

In my case, the problem is only for some images, but it consistently has problems with these images. If I remove them, the pipeline will run without an error, but it can be a problem for a third or more of the images. The images themselves don’t appear different to me from those that don’t cause problems.

I am using 3.1.5 on a Mac. Does anyone know of a build that does not have this problem? It would be best for me to stick with CP3, but I would go back to CP2 if needed.




I’ve had to roll back our cluster installation to 3.0.0 which doesn’t seem to have the issue.


Thank you very much for your reply :slight_smile:

Best wishes,


As an update; I eventually am using 2.1.1 that seems to be fine, and doesn’t have this bug.
Fingers crossed…

Best wishes,