Failed to load pipeline when running CellProfiler as a python package

cellprofiler

#1

Hi,

I’m having trouble loading an example pipeline when running CellProfiler in python directly. After looking into the source code a bit, it looks like it’s incorrectly parsing the cppipe file and trying to pass in the “Threshold correction factor” which can be a float as the “Threshold setting version” which must be an integer for the IdentifySecondaryObjects module. The command “python -m cellprofiler --version” returns “3.0.0rc3” if that helps. More info below.

Python file contents:
import cellprofiler.pipeline
pipeline = cellprofiler.pipeline.Pipeline()
pipeline.load("./ExampleHuman.cppipe")

Error message:
ERROR:root:Failed to load pipeline
Traceback (most recent call last):
File “/Users/Lutie/UROP/Python Code/venv/lib/python2.7/site-packages/cellprofiler/pipeline.py”, line 1046, in loadtxt
module_name, from_matlab)
File “/Users/Lutie/UROP/Python Code/venv/lib/python2.7/site-packages/cellprofiler/module.py”, line 174, in set_settings_from_values
from_matlab)
File “/Users/Lutie/UROP/Python Code/venv/lib/python2.7/site-packages/cellprofiler/modules/identifysecondaryobjects.py”, line 532, in upgrade_settings
threshold_settings_version = int(threshold_setting_values[0])
ValueError: invalid literal for int() with base 10: ‘1.0’

Any help would be greatly appreciated!

Best,
Sabrina


#2

Hi Sabrina,
A few questions-

  1. Can you upgrade CP at least as far as the 3.0.0 tag? You can checkout v3.0.0 .
  2. If that doesn’t fix it, can you post the pipeline here and the output of pip freeze? Thanks.