Errors in ExportToSpreasheet


I’ve developed a fairly lengthy analysis pipeline on CellProfiler 3.1.5. It seems to be working fine except for some errors in the ExportToDatasheet module:

  • I can’t check the option to ‘Select the elements to export’ - the window won’t pop open, so have to leave ‘No’ as default and the spreadsheet contains everything.

  • I get the following error message: " Encountered unrecoverable error in ExportToSpreadsheet during post-processing: ‘ascii’ codec can’t decode byte 0xff in position 7: ordinal not in range(128)"

Neither of these necessarily keep the pipeline from working, but it’d good to know how to addressed them.

Any advice would be great.


1 Like

I am having the exact same problem. Both issues!

My error message is exactly the same to yours “Encountered unrecoverable error in ExportToSpreadsheet during post-processing: ‘ascii’ codec can’t decode byte 0xff in position 7: ordinal not in range(128)”

Using Mac OS X El Capitan (10.11.4), Cell Profiler 3.1.5

Anyone have any advice?

UPDATE: I was able to figure out where the problem was.

It is not a Mac issue, tried running the same pipeline on a PC and had the same errors.

If “Export all measurement types” was selected to ‘Yes’ in ExportToSpreadsheet, then I am able to get the .csv for “Cells” and “Experiment” but not for “Nuclei” or “FilteredNuclei”. Thats when I realized that maybe the issue was with the nuclei measurements.

After playing around a little, I found that in “IdentifySecondaryObject” the option to ‘Discard secondary objects touching the border of the image’ when selected ‘Yes’ gives the option to ‘Discard associated primary objects’. When ‘Discard associated primary objects’ is selected ‘No’, my bug is fixed. All of a sudden, I am able to go to ‘ExportToSpreadsheet’ and click on ‘Select the elements to export’ successfully (window pops up), I no longer get the error message, and I successfully export the .csv for Nuclei!

Unfortunately, I really would like to filter my nuclei and hope this bug gets fixed soon. For now, this will have to do.


I have the exact same error and problem. Did you create your core pipeline in 2.2.0 by any chance? I am wondering if there are issues with migration


Apologies for the late reply. Well done on finding the source the glitch, @R_B! I find that unchecking that box does allow me to select elements to export. However, that means those primary objects near the edge can’t be excluded and I’m getting a different error now when I run a ‘RelateObjects’ module… so it’s far from idea. Hope the bug gets fixed soon!

In response to @Kieran_McGourty, I may have moved the pipeline from CP 3.0.0. to the current 3.1.5. (can’t quite remember) so I guess that could have something to do with the issue.


What kind of error you will get when running related objects module?? Can you please upload your pipeline and sample image?


Hi guys,

That ExportToSpreadsheet bug got fixed 2 weeks ago, so it should be taken care of in our next release (hopefully next week!)


I’m having the same bug on the cellprofiler 3.1.5

1 Like

I’m still having what I believe to be the same issue in CP 3.1.9.


I have been getting the same error message and I am using the latest current version of cellprofiler.

@yoser-alrawi would you be able to upload a copy of the problem pipeline, perhaps with an example image set?

Hi, I have exactly the same problem with my CellProfiler 4.0.4. Do you know how to fix that ?

Can you upload a copy of the pipeline and example image set(s), so we can try to verify, trace, and fix? Thanks.