File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
cellprofiler_core/pipeline Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -580,7 +580,15 @@ def setup_module(
580580 raise ValueError ("Invalid format for attributes: %s" % attribute_string )
581581 # Fix for array dtypes which contain split separator
582582 attribute_string = attribute_string .replace ("dtype='|S" , "dtype='S" )
583- attribute_strings = attribute_string [1 :- 1 ].split ("|" )
583+ if len (re .split ("(?P<note>\|notes:\[.*?\]\|)" ,attribute_string )) == 3 :
584+ # 4674- sometimes notes have pipes
585+ prenote ,note ,postnote = re .split ("(?P<note>\|notes:\[.*?\]\|)" ,attribute_string )
586+ attribute_strings = prenote [1 :].split ("|" )
587+ attribute_strings += [note [1 :- 1 ]]
588+ attribute_strings += postnote [:- 1 ].split ("|" )
589+ else :
590+ #old or weird pipeline without notes
591+ attribute_strings = attribute_string [1 :- 1 ].split ("|" )
584592 variable_revision_number = None
585593 # make batch_state decodable from text pipelines
586594 # NOTE, MAGIC HERE: These variables are **necessary**, even though they
You can’t perform that action at this time.
0 commit comments