Unrecoverable error 'ObjectNameSubscriber'


#1

Hi,
I’m first-time poster and new user (after recently attending one of Anne’s workshops in Edinburgh).
I’ve been trying to segment nuclei and cell outlines from DAPI & phalloidin two-channel TIFFs.
I can get everything working in test mode step-by-step but come across errors when trying to analyse the whole batch of images.
I’d like to import the CellProfiler-generated data into CellProfiler Analyst so have added an ExportToDatabase module.
I get the following error:
“Encountered unrecoverable error in ExportToDatabase during post-processing: ‘ObjectNameSubscriber’ object has no attribute ‘encode’”

i can’t tell if I’ve done something stupid or if it a real software error.

Would anyone be able to help me out here?

I’ve exported a pipeline:
CellProfiler Pipeline: http://www.cellprofiler.org
Version:3
DateRevision:300
GitHash:
ModuleCount:19
HasImagePlaneDetails:False

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?:Images only
Select the rule criteria:and (extension does isimage) (directory doesnot containregexp “\x5B\\\\\\\\/\x5D\\\\.”)

Metadata:[module_num:2|svn_version:‘Unknown’|variable_revision_number:4|show_window:False|notes:\x5B’The Metadata module optionally allows you to extract information describing your images (i.e, metadata) which will be stored along with your measurements. This information can be contained in the file name and/or location, or in an external file.’\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\x5B0-9\x5D{3})-Scene-(?P\x5B0-9\x5D)_m(?P\x5B0-9\x5D{4}).(?P\x5B0-9\x5D)ORG.tif
Regular expression to extract from folder name:(?P\x5B0-9\x5D{4}
\x5B0-9\x5D{2}
\x5B0-9\x5D{2})$
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:\x5B’The NamesAndTypes module allows you to assign a meaningful name to each image by which other modules will refer to it.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Assign a name to:Images matching rules
Select the image type:Grayscale image
Name to assign these images:DNA
Match metadata:\x5B\x5D
Image set matching method:Order
Set intensity range from:Image metadata
Assignments count:2
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 “DAPI_1_ORG.tif”)
Name to assign these images:OrigBlue
Name to assign these objects:Cell
Select the image type:Grayscale image
Set intensity range from:Image metadata
Maximum intensity:255.0
Select the rule criteria:and (file does contain “FITC_2_ORG.tif”)
Name to assign these images:OrigGreen
Name to assign these objects:Nucleus
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:\x5B’The Groups module optionally allows you to split your list of images into image subsets (groups) which will be processed independently of each other. Examples of groupings include screening batches, microtiter plates, time-lapse movies, etc.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Do you want to group your images?:Yes
grouping metadata count:2
Metadata category:Plate
Metadata category:Well

Crop:[module_num:5|svn_version:‘Unknown’|variable_revision_number:3|show_window:False|notes:\x5B’Crop the DAPI image down to a 200 x 200 rectangle by entering specific coordinates.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:False|wants_pause:False]
Select the input image:OrigBlue
Name the output image:CropBlue
Select the cropping shape:Rectangle
Select the cropping method:Coordinates
Apply which cycle’s cropping pattern?:First
Left and right rectangle positions:4500,6000
Top and bottom rectangle positions:5600,7100
Coordinates of ellipse center:200,500
Ellipse radius, X direction:400
Ellipse radius, Y direction:200
Remove empty rows and columns?:Edges
Select the masking image:None
Select the image with a cropping mask:None
Select the objects:None

Crop:[module_num:6|svn_version:‘Unknown’|variable_revision_number:3|show_window:False|notes:\x5B’Use the same cropping from the DAPI image for FITC image.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:False|wants_pause:False]
Select the input image:OrigGreen
Name the output image:CropGreen
Select the cropping shape:Previous cropping
Select the cropping method:Coordinates
Apply which cycle’s cropping pattern?:First
Left and right rectangle positions:300,600
Top and bottom rectangle positions:300,600
Coordinates of ellipse center:500,500
Ellipse radius, X direction:400
Ellipse radius, Y direction:200
Remove empty rows and columns?:Edges
Select the masking image:None
Select the image with a cropping mask:CropBlue
Select the objects:None

IdentifyPrimaryObjects:[module_num:7|svn_version:‘Unknown’|variable_revision_number:13|show_window:True|notes:\x5B’Identify the nuclei from the DAPI image. Three-class thresholding performs better than the default two-class thresholding in this case.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the input image:OrigBlue
Name the primary objects to be identified:Nuclei
Typical diameter of objects, in pixel units (Min,Max):10,60
Discard objects outside the diameter range?:Yes
Discard objects touching the border of the image?:Yes
Method to distinguish clumped objects:Shape
Method to draw dividing lines between clumped objects:Intensity
Size of smoothing filter:10
Suppress local maxima that are closer than this minimum allowed distance:10
Speed up by using lower-resolution image to find local maxima?:Yes
Fill holes in identified objects?:Never
Automatically calculate size of smoothing filter for declumping?:Yes
Automatically calculate minimum allowed distance between local maxima?:No
Handling of objects if excessive number of objects identified:Continue
Maximum number of objects:500
Use advanced settings?:Yes
Threshold setting version:9
Threshold strategy:Global
Thresholding method:Otsu
Threshold smoothing scale:1.3488
Threshold correction factor:1.0
Lower and upper bounds on threshold:0.01,1
Manual threshold:0.0
Select the measurement to threshold with:None
Two-class or three-class thresholding?:Two classes
Assign pixels in the middle intensity class to the foreground or the background?:Background
Size of adaptive window:10
Lower outlier fraction:0.05
Upper outlier fraction:0.05
Averaging method:Mean
Variance method:Standard deviation
# of deviations:2
Thresholding method:Otsu

IdentifySecondaryObjects:[module_num:8|svn_version:‘Unknown’|variable_revision_number:10|show_window:True|notes:\x5B’Identify the cells by using the nuclei as a “seed” region, then growing outwards until stopped by the image threshold or by a neighbor. The Propagation method is used to delineate the boundary between neighboring cells.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the input objects:Nuclei
Name the objects to be identified:Cells
Select the method to identify the secondary objects:Watershed - Gradient
Select the input image:OrigGreen
Number of pixels by which to expand the primary objects:10
Regularization factor:0.05
Discard secondary objects touching the border of the image?:Yes
Discard the associated primary objects?:Yes
Name the new primary objects:RemovedNuclei
Fill holes in identified objects?:Yes
Threshold setting version:9
Threshold strategy:Global
Thresholding method:Minimum cross entropy
Threshold smoothing scale:0
Threshold correction factor:1
Lower and upper bounds on threshold:0.01,1
Manual threshold:0
Select the measurement to threshold with:None
Two-class or three-class thresholding?:Two classes
Assign pixels in the middle intensity class to the foreground or the background?:Foreground
Size of adaptive window:10
Lower outlier fraction:0.05
Upper outlier fraction:0.05
Averaging method:Mean
Variance method:Standard deviation
# of deviations:2
Thresholding method:Otsu

IdentifyTertiaryObjects:[module_num:9|svn_version:‘Unknown’|variable_revision_number:3|show_window:False|notes:\x5B’Identify the cytoplasm by “subtracting” the nuclei objects from the cell objects.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the larger identified objects:Cells
Select the smaller identified objects:Nuclei
Name the tertiary objects to be identified:Cytoplasm
Shrink smaller object prior to subtraction?:Yes

ConvertObjectsToImage:[module_num:10|svn_version:‘Unknown’|variable_revision_number:1|show_window:False|notes:\x5B\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the input objects:Cells
Name the output image:CellImage
Select the color format:Color
Select the colormap:Default

ConvertObjectsToImage:[module_num:11|svn_version:‘Unknown’|variable_revision_number:1|show_window:False|notes:\x5B\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the input objects:Nuclei
Name the output image:NucleiImage
Select the color format:Color
Select the colormap:Default

MeasureObjectSizeShape:[module_num:12|svn_version:‘Unknown’|variable_revision_number:1|show_window:False|notes:\x5B’Measure morphological features from the cell, nuclei and cytoplasm objects.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select objects to measure:Cells
Select objects to measure:Nuclei
Select objects to measure:Cytoplasm
Calculate the Zernike features?:No

MeasureObjectIntensity:[module_num:13|svn_version:‘Unknown’|variable_revision_number:3|show_window:False|notes:\x5B’Measure intensity features from nuclei and cell objects against the cropped DAPI image.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Hidden:2
Select an image to measure:OrigGreen
Select an image to measure:OrigBlue
Select objects to measure:Cells
Select objects to measure:Cytoplasm
Select objects to measure:Nuclei

MeasureTexture:[module_num:14|svn_version:‘Unknown’|variable_revision_number:5|show_window:False|notes:\x5B’Measure texture features of the nuclei, cells and cytoplasm from the cropped DAPI image.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Hidden:2
Hidden:3
Hidden:1
Select an image to measure:OrigGreen
Select an image to measure:OrigBlue
Select objects to measure:Nuclei
Select objects to measure:Cells
Select objects to measure:Cytoplasm
Texture scale to measure:3
Measure images or objects?:Both

GrayToColor:[module_num:15|svn_version:‘Unknown’|variable_revision_number:3|show_window:False|notes:\x5B’Combine the cropped grayscale channels into a color RGB image.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select a color scheme:RGB
Select the image to be colored red:Leave this black
Select the image to be colored green:OrigGreen
Select the image to be colored blue:OrigBlue
Name the output image:RGBImage
Relative weight for the red image:1
Relative weight for the green image:1
Relative weight for the blue image:1
Select the image to be colored cyan:None
Select the image to be colored magenta:None
Select the image to be colored yellow:None
Select the image that determines brightness:None
Relative weight for the cyan image:1
Relative weight for the magenta image:1
Relative weight for the yellow image:1
Relative weight for the brightness image:1
Hidden:1
Image name:None
Color:#ff0000
Weight:1.0

SaveImages:[module_num:16|svn_version:‘Unknown’|variable_revision_number:13|show_window:False|notes:\x5B’Save the color image as an 8-bit TIF, appending the text RBG to the original filename of the DAPI image.’\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the type of image to save:Image
Select the image to save:RGBImage
Select method for constructing file names:Sequential numbers
Select image name for file prefix:OrigBlue
Enter file prefix:CellImage
Number of digits:5
Append a suffix to the image file name?:Yes
Text to append to the image name:RGB
Saved file format:tiff
Output file location:Default Output Folder\x7CNone
Image bit depth:8-bit integer
Overwrite existing files without warning?:No
When to save:Every cycle
Record the file and path information to the saved image?:Yes
Create subfolders in the output folder?:No
Base image folder:Default Input Folder

SaveImages:[module_num:17|svn_version:‘Unknown’|variable_revision_number:13|show_window:False|notes:\x5B\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:False|wants_pause:False]
Select the type of image to save:Image
Select the image to save:NucleiImage
Select method for constructing file names:Sequential numbers
Select image name for file prefix:OrigBlue
Enter file prefix:NucleiImage
Number of digits:5
Append a suffix to the image file name?:Yes
Text to append to the image name:RGB
Saved file format:tiff
Output file location:Default Output Folder\x7CNone
Image bit depth:8-bit integer
Overwrite existing files without warning?:No
When to save:Every cycle
Record the file and path information to the saved image?:No
Create subfolders in the output folder?:No
Base image folder:Default Input Folder

ExportToSpreadsheet:[module_num:18|svn_version:‘Unknown’|variable_revision_number:12|show_window:False|notes:\x5B"Export any measurements to a comma-delimited file (.csv). The measurements made for the nuclei, cell and cytoplasm objects will be saved to separate .csv files, in addition to the per-image .csv’s."\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Select the column delimiter:Comma (",")
Add image metadata columns to your object data file?:No
Select the measurements to export:No
Calculate the per-image mean values for object measurements?:Yes
Calculate the per-image median values for object measurements?:No
Calculate the per-image standard deviation values for object measurements?:No
Output file location:Default Output Folder\x7C.
Create a GenePattern GCT file?:No
Select source of sample row name:Metadata
Select the image to use as the identifier:None
Select the metadata to use as the identifier:None
Export all measurement types?:No
Press button to select measurements:None\x7CNone
Representation of Nan/Inf:NaN
Add a prefix to file names?:No
Filename prefix:MyExpt_
Overwrite existing files without warning?:Yes
Data to export:Image
Combine these object measurements with those of the previous object?:No
File name:Image.csv
Use the object name for the file name?:No
Data to export:Nuclei
Combine these object measurements with those of the previous object?:No
File name:Nuclei.csv
Use the object name for the file name?:No
Data to export:Cells
Combine these object measurements with those of the previous object?:No
File name:Cells.csv
Use the object name for the file name?:No
Data to export:Cytoplasm
Combine these object measurements with those of the previous object?:No
File name:Cytoplasm.csv
Use the object name for the file name?:No

ExportToDatabase:[module_num:19|svn_version:‘Unknown’|variable_revision_number:27|show_window:False|notes:\x5B\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]
Database type:MySQL / CSV
Database name:DefaultDB
Add a prefix to table names?:No
Table prefix:DCMorphology_
SQL file prefix:SQL_
Output file location:Default Output Folder\x7C
Create a CellProfiler Analyst properties file?:Yes
Database host:
Username:
Password:
Name the SQLite database file:DefaultDB.db
Calculate the per-image mean values of object measurements?:No
Calculate the per-image median values of object measurements?:Yes
Calculate the per-image standard deviation values of object measurements?:Yes
Calculate the per-well mean values of object measurements?:Yes
Calculate the per-well median values of object measurements?:Yes
Calculate the per-well standard deviation values of object measurements?:Yes
Export measurements for all objects to the database?:All
Select the objects:
Maximum # of characters in a column name:64
Create one table per object, a single object table or a single object view?:Single object table
Enter an image url prepend if you plan to access your files via http:
Write image thumbnails directly to the database?:No
Select the images for which you want to save thumbnails:CellImage,NucleiImage,RGBImage
Auto-scale thumbnail pixel intensities?:Yes
Select the plate type:None
Select the plate metadata:None
Select the well metadata:None
Include information for all images, using default values?:Yes
Properties image group count:1
Properties group field count:1
Properties filter field count:0
Workspace measurement count:1
Experiment name:DC Morphology
Which objects should be used for locations?:Nuclei
Enter a phenotype class table name if using the Classifier tool in CellProfiler Analyst:PhenotypeClasses
Export object relationships?:No
Overwrite without warning?:Never
Access CellProfiler Analyst images via URL?:No
Select the classification type:Object
Select an image to include:None
Use the image name for the display?:Yes
Image name:Channel1
Channel color:red
Do you want to add group fields?:No
Enter the name of the group:
Enter the per-image columns which define the group, separated by commas:ImageNumber, Image_Metadata_Plate, Image_Metadata_Well
Do you want to add filter fields?:No
Automatically create a filter for each plate?:No
Create a CellProfiler Analyst workspace file?:No
Select the measurement display tool:Histogram
Type of measurement to plot on the X-axis:Image
Enter the object name:None
Select the X-axis measurement:None
Select the X-axis index:ImageNumber
Type of measurement to plot on the Y-axis:Image
Enter the object name:None
Select the Y-axis measurement:None
Select the Y-axis index:ImageNumber
"