Error shows matplotlib-problem (windows 10)



Dear all,

Does anyone have an idea where this error comes from?


Since I had a problem after my last Java update (could not open cellprofiler anymore), I uninstalled cellprofiler 3.0.0 and I installed the newest cellprofiler release. Now I can open cellprofiler, but as soon as I start the first step in the testmode with my images (which is the ColorToGray module in my pipeline), I receive the error. I’m happy for any help!!!
Some version informations:

java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

jdk1.8.0_171 and jre1.8.0_181 in “C:\Program Files\Java”

cellprofiler 3.1.5 in “C:\Program Files\CellProfiler\CellProfiler.exe”

computer: desktop, windows 10, 64-bit

Thanks a lot, Nadine


Hi Nadine,
Can you upload your pipeline and a sample image set so we can try to reproduce this? Thanks!


Dear bcimini,
Thanks for your fast reply! My pipeline (which was working fine the last months…) is here (unfortunately, I can only upload pictures as a new user):

Here is also the beginning of the pipeline as a text from a former analysis with cellprofiler 3.0.0 (some parts are shortened, indicated with […]):

Pipeline_Pipeline,"CellProfiler Pipeline:

Images:[module_num:1|svn_version:‘Unknown’|variable_revision_number:2|show_window:False|notes:\x5B’To begin creating your project, use the Images module to compile a list of files and/or folders that you want to analyze. You can also specify a set of rules to include only the desired files in your selected folders.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Filter images?:Custom
Select the rule criteria:and (file doesnot startwith “”."")

Metadata:[module_num:2|svn_version:‘Unknown’|variable_revision_number:4|show_window:False|notes:[…].’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Extract metadata?:Yes
Metadata data type:Text
Metadata types:{}
Extraction method count:1
Metadata extraction method:Extract from file/folder names
Metadata source:File name
Regular expression to extract from file name:^(?P.*)_(?P\x5BA-P\x5D\x5B0-9\x5D{2})s(?P\x5B0-9\x5D)w(?P\x5B0-9\x5D)
Regular expression to extract from folder name:(?P\x5B0-9\x5D{4}
Extract metadata from:All images
Select the filtering criteria:and (file does contain “”"")
Metadata file location:
Match file and image metadata:\x5B\x5D
Use case insensitive matching?:No

NamesAndTypes:[module_num:3|svn_version:‘Unknown’|variable_revision_number:8|show_window:False|notes:[…].’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Assign a name to:All images
Select the image type:Color image
Name to assign these images:AnalyseA
Match metadata:\x5B\x5D
Image set matching method:Order
Set intensity range from:Image metadata
Assignments count:1
Single images count:0
Maximum intensity:255.0
Process as 3D?:No
Relative pixel spacing in X:1.0
Relative pixel spacing in Y:1.0
Relative pixel spacing in Z:1.0
Select the rule criteria:and (file does contain “”"")
Name to assign these images:DNA
Name to assign these objects:Cell
Select the image type:Grayscale image
Set intensity range from:Image metadata
Maximum intensity:255.0

Groups:[module_num:4|svn_version:‘Unknown’|variable_revision_number:2|show_window:False|notes:[…].’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Do you want to group your images?:Yes
grouping metadata count:1
Metadata category:FileLocation

ColorToGray:[module_num:5|svn_version:‘Unknown’|variable_revision_number:3|show_window:True|notes:\x5B\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the input image:AnalyseA
Conversion method:Combine
Image type:RGB
Name the output image:AnalyseB
Relative weight of the red channel:1.0
Relative weight of the green channel:1.0
Relative weight of the blue channel:1.0
Convert red to gray?:Yes
Name the output image:OrigRed
Convert green to gray?:Yes
Name the output image:OrigGreen
Convert blue to gray?:Yes
Name the output image:OrigBlue
Convert hue to gray?:Yes
Name the output image:OrigHue
Convert saturation to gray?:Yes
Name the output image:OrigSaturation
Convert value to gray?:Yes
Name the output image:OrigValue
Channel count:1
Channel number:Red\x3A 1
Relative weight of the channel:1.0
Image name:Channel1

and these are some sample pictures:

Thanks again, Nadine


Hi, I’m getting the same Error message after updating to CellProfiler 3.1.5.

Did you solve the issue ?


Hi Nanny,

Thanks for reporting this bug. Could you please check if closing eyeball on running the pipeline helps since it is a display error. Meanwhile I opened this issue on GitHub.



Could you please upload your pipeline again?


Hi, I cannot reproduce this problem in CellProfiler version 3.1.5. Can you please check if you have selected Image type in Names and Types as color image?


Dear Habbasi,

(I was on holiday, therefore, sorry for my late reply). Yes, color image is selected in “Names and Types”. In the meantime I found out, that I can kind of “solve” the problem, when I use the conversion method “split” instead of “combine” in the color to gray module. The results are still ok for me (actually I only need the ‘green to grey’ pictures).
However, I also tried your suggested method with the closing eyeball now: When I close the eyeball for the ‘color to gray’ module, it is working also in the “combine-method”. Thanks a lot, this was very helpful!
Best wishes,