FilterObjects by CalculateMath measurement works on macOS but fails on Linux



I found interesting behavior of FilterObjects failing on both CentOS 7.3 and Ubuntu 16.04 Linux in CellProfiler 2.2.0. I was trying to reproduce this on Distributed CellProfiler, but looks like my AWS setup will take a while.

Steps to reproduce:

  1. Grab the pipeline.
  2. Drag and drop each of these 3 images into the File list.
  3. In the FilterObjects module toward the end of the pipeline, set: Category = “Math”.
  4. Wait for a few seconds till the error text changes to “Math has an unmeasured feature name”
  5. Set Measurement = “ect_signal”

Result: On Linux, the measurement Category drop-down menu immediately resets to [None]. There is no error message in the shell. Running with -L DEBUG just shows the usual HDF5Dict.flush(). However this works fine on macOS 10.11, and I get sensible output running the pipeline.

Other notes: using a different measurement works fine on Linux, for example:

  • Category = “Location”
  • Measurement = “CenterMassIntensity_X”
  • Image = “ect_raw”

I tried to dive into debugging the module, but for some reason “Test” > “Break into debugger” is not available on macOS; only Linux. The relevant wiki section is empty but on Linux I can enter Test Mode and set break points running “Test” > “Break into debugger” and set a breakpoint at the beginning of the add_measurement() function:

(Pdb) break /home/omsai/code/CellProfiler/cellprofiler/modules/
Breakpoint 1 at /home/omsai/code/CellProfiler/cellprofiler/modules/
(Pdb) continue

… and the rerun the module in Test Mode. The breakpoint returns control back to the debugger when clicking on the drop-down and can inspect the module input validation code.

So my questions are:

  1. Can anyone else reproduce the issue on Linux?
  2. How does one access the debugger on macOS for me to compare why it is working there? On macOS, per David Logan’s command I’m launching CellProfiler from the shell using:
arch -x86_64 /Applications/ -L DEBUG

Although this doesn’t even give the usual debug output. Also using -h, CellProfiler exists with no help message. It’s like stdout / stderr is being directed elsewhere instead of the terminal.

Edit: typos


I’ve made this an issue in our GitHub repository here; hopefully our SWEs can figure some of this out for you.


Cool, thanks. I’ve subscribed to that GitHub issue.