Classify pixels: unsupported operand type

i have been getting the following message when I run the pipeline attached below.

Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 309, in run
File “cellprofiler\modules\classifypixels.pyc”, line 108, in run
TypeError: unsupported operand type(s) for *: ‘float’ and ‘NoneType’

I am trying to use to pipeline to merge pictures of 2 different stains, subtract autofluorescence, enhance contrast somewhat, and then use classify pixels to distinguish double stained cells, single stained cells, and unstained cells. I am using tiff images. I trained the ilastik classifiers by running the pipeline up to the classify pixels step and saving the images as 8 bit tiffs that point. Also, I have had some success by running the pipeline up to the classify pixels step and saving the images as tiffs at that point and then importing the newly saved tiffs into a new pipeline and going directly into classify pixels. I used the version of ilastik bundled with cell profiler. Any suggestions would be appreciated.


PS. I was unable to upload the h5 files for ilastik. I would be happy to send them to anyone who wanted to take a look at them.

20x count + overlap (screens).cp (49.4 KB)

Hi Jeff,

Sorry for the slow response – Are you still having trouble?

I am getting memory errors before I even get to Classify Pixels. It looks like the complex(!) RunImageJ macros you have are eating up a lot of memory. I suspect (but do not know) that the java.lang.System.gc and the ‘Close’ calls are unnecessary.

OK, it looks like this might be a bug that has been fixed:
Could you try this out on a new version of CP? Try the 2.0 (NOT 2.1) version here:

If you are still having trouble after the above suggestions, would you post the h5 classifier file? You can try Dropbox, Google Drive or any other online hosting solutions.