MeasureObjectNeighbors Error

Hi all,

I really need to get the neighbors working. I have created a simple project
nuc_f480_neighbors_cp211.cpproj (909.6 KB)
and the .lif file I’m playing with is here: (5.6 MB)

I get the following error on the neighbors module:

Traceback (most recent call last):
_ File “cellprofiler\gui\pipelinecontroller.pyc”, line 2777, in do_step_
_ File “cellprofiler\modules\measureobjectneighbors.pyc”, line 432, in run_
IndexError: index (152) out of range (0<=index<148) in dimension 0

I’d really appreciate any feedback. This is on a Win64 PC, with CP 2.1.1. I’m getting similar errors using CP 2.2.0rc2 also and can upload anything that helps.

Thanks in advance for your time.


Hi Neil,
I just replicated this on my own machine with a nightly build from the last week or so, and from a search of the forum you’re not the first. MeasureObjectNeighbors only seems to work when measuring neighbors of the same object, not a different one. Will file as a bug, which in the future you can do here:

Also, I see you mentioned in your post here you get that error on one machine but not another- can you tell us anything about the difference between the two computers? OS’es, 32 bit vs 64 bit, etc?

Hi Beth,
Alas, there’s no reg flags in that direction. Both Dell workstations with their original Dell version of Win7 64bit OS installed; a T3600 and a T7800.

What other factors would play a role? What libraries or dependencies does CP outside of the install file? Would the java version make a difference? How about additional python libraries or paths… For example, both machines have Blender installed, and I believe that comes with some python related environment paths etc. … How about GPU? Does CP ever use CUDA or OpenCL for calculations? The machines do have different GPUs.

I’ve seen this kind of issue fixed by uninstalling and running CCleaner reg cleaner before reinstalling. Would you recommend something like that, or would that just be guess work? i.e. do you know of registry based issues that specifically affect the operation of CP that might be rectified by cleaning things out?

Any tips/suggestions much appreciated.


Sorry, didn’t see the previous post about the bug. Thanks for submitting that.

Any thoughts on work-arounds in the meantime?


Unfortunately my answer to most of your questions is “I don’t know”- you are certainly welcome to tinker with stuff like running a reg cleaner, and be sure to let us know if it works!
You said in your previous post you were trying to switch to using RelateObjects as a workaround but were having issues figuring out the output- if you give me more details I can try to fix that issue for you.

I’ve been encountering an identical bug to the one described above and will be thrilled when a fix comes out!

Philip Tan
Cardiac Systems Biology Lab
University of Virginia