Failed to load pipeline when running CellProfiler as a python package




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()

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/”, line 1046, in loadtxt
module_name, from_matlab)
File “/Users/Lutie/UROP/Python Code/venv/lib/python2.7/site-packages/cellprofiler/”, line 174, in set_settings_from_values
File “/Users/Lutie/UROP/Python Code/venv/lib/python2.7/site-packages/cellprofiler/modules/”, 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!



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.