Exception in CellProfiler Core Processing

Hello,

When I click “Analyze Images,” I get the following two errors simultaneously:

Failure in analysis startup.
Traceback (most recent call last):
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2093, in on_analyze_images
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/analysis.py”, line 113, in start
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/analysis.py”, line 190, in init
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 679, in copy
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 856, in load
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 1143, in loadtxt
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 549, in read_image_plane_details
TypeError: init() got multiple values for keyword argument ‘channel’

Exception in CellProfiler Core Processing
Traceback (most recent call last):
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2104, in on_analyze_images
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2498, in stop_running
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/analysis.py”, line 132, in cancel
AttributeError: ‘NoneType’ object has no attribute ‘cancel’

It then says indefinitely, “Processing: 0 of 1 image sets complete.”

I’ve tried reinstalling CellProfiler 2.1 and it didn’t help… What do these errors mean? The pipeline works fine in test mode. I’ve attached the pipeline.

Thanks,
Mat
screen_20x_analysis_05-06-14_ms.cpproj (4.62 MB)

Hi, I’m also getting a similar error. Here’s my error and pipeline.

Exception in CellProfiler Core Processing
Traceback (most recent call last):
File “cellprofiler\utilities\thread_excepthook.pyc”, line 27, in run_with_except_hook
File “threading.pyc”, line 483, in run
File “cellprofiler\analysis.pyc”, line 598, in jobserver
File “cellprofiler\preferences.pyc”, line 121, in preferences_as_dict
File “cellprofiler\preferences.pyc”, line 121, in
File “cellprofiler\preferences.pyc”, line 180, in config_read
File “cellprofiler\utilities\utf16encode.pyc”, line 65, in utf16decode
ValueError: invalid literal for int() with base 16: ‘nive’

I was using the previous version just fine. I have attached the previous pipeline and my converted pipeline.

Hi there,

I am getting the same error messages. Running Cell Profiler 2.1.0 on MacOS X 10.7.5

Failure in analysis startup
[size=85]Traceback (most recent call last):
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2093, in on_analyze_images
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/analysis.py”, line 113, in start
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/analysis.py”, line 190, in init
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 679, in copy
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 856, in load
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 1143, in loadtxt
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/pipeline.py”, line 549, in read_image_plane_details
TypeError: init() got multiple values for keyword argument ‘channel’[/size]

Exception in Cell Profiler Core Processing
[size=85]Traceback (most recent call last):
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2104, in on_analyze_images
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2498, in stop_running
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/analysis.py”, line 132, in cancel
AttributeError: ‘NoneType’ object has no attribute ‘cancel’[/size]

Pipeline runs fine in test mode, the error occurs as soon as I click “Analyze Images”.
Also, processing resumes despite the error message and appears to be stuck as described by the previous poster.
I am attaching the pipeline as well.

Cheers,

Frank
Staining_Intensity_2.cppipe (17.1 KB)

Ok, I have done some more testing - recreated the pipeline for Cellprofiler2.0(r11710).
With this release I get the following error already in test mode:

[size=85]Traceback (most recent call last):
File “/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 932, in do_step
File “/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.7/cellprofiler/modules/loadimages.py”, line 2136, in run
ValueError: Image set has conflicting channel metadata: Rhodamine vs DAPI
[/size]

So, apparently the problem lies in the metadata extraction, but how they are conflicting is beyond me…

Any advice would be highly appreciated.

Cheers,

Frank
StainingIntensity.cp (14.6 KB)

Hi Frank,
Would you mind posting the .cpproj file that goes with the Staining_Intensity_2.cppipe pipeline you posted?
Regards,
-Mark

Hi Mark,

unfortunately I did not save a project file since I was only playing around with the analysis at that point. However, I am attaching another project file and pipeline that recreate the error.
I managed to sort it out last night myself, the answer was in the ‘Regular Expression’ help of the Settings pane for the ‘Metadata’ input module:

Should have read that to the end… Everything works fine if I remove the ‘channel’ metadata tag - I only used it to assign NamesAndTypes which can easily be done based on file name instead.
Nonetheless, it would be good if that error was picked up in Test Mode.
Another problem is that there is no button to stop processing in the dialog for the error message(s), and no stop or pause button in the main window (see attached screenshots).

Cheers,

Frank



Staining_Intensity.cpproj (637 KB)
Staining_Intensity.cppipe (17.1 KB)

[quote=“FGesellchen”]Everything works fine if I remove the ‘channel’ metadata tag - I only used it to assign NamesAndTypes which can easily be done based on file name instead.
Nonetheless, it would be good if that error was picked up in Test Mode.[/quote]

If you hit the “Update” button below the sash on NamesAndTypes, it should show the listing based on the current settings. If you add “channel” back in, you’ll see a message box that says “Sorry, your pipeline doesn’t produce any valid image sets as currently configured. Check your Input module settings…” Unfortunately, it’s hard to be much more specific than that since there are so many reasons that an image set can fail to be made.

Yes, we could stand to make this nuance re: metadata tag to use a bit clearer in the documentation. We tried to provide a detailed example for the help for the “Match metadata” widget in NamesAndTypes, which is where the problem occurs if you set it wrong. If you have suggestions on making it clearer, please let us know.

I have noticed this myself and have filed a bug report here: github.com/CellProfiler/CellPro … ssues/1049

Regards,
-Mark

Mat, does Frank’s solution clear up your problem as well?
-Mark

Delenn326, your problem appears to be something else entirely. Can you export your registry settings and post them here?

You can do you in the following way:

  • Open the registry editor: Instructions here - pcsupport.about.com/od/registry/ … editor.htm
  • In the editor tree, browse to Computer\HKEY_CURRENT_USER\Software\CellProfilerLocal.cfg
  • Right-click on the CellProfilerLocal.cfg folder in the left panel, and select “Export” from the context menu.
  • Give the exported file a name of choice and click “Save”.

If the forum balks at posting a file with the extension .reg, rename the file to have the extension .txt and try posting it again.
-Mark

Hi Mark,

Strangely enough, I don’t see that message box if I have three channels as metadata tags, hence the confusion (see attached screenshot). If I only have two channels, the message does pop up, however!?

The help files and the provided examples are very helpful, indeed. Since I did not get the message box, I just did not know where to start looking…

Regards,
Frank


Hi Mark,
I did what you said, but it said even the txt extension is not allowed. I’ve uploaded it to my google drive and you should be able to get it here: drive.google.com/file/d/0ByAJkf … sp=sharing
Thanks!
Anne

Hi Anne,

Turns out it a oddity associated with folder names and upgrading from 2.0 to 2.1. I won’t go into details, but suffice it to say that things failed because your pipeline started with a ‘u’ :smile:
You can get around this by closing CP, opening up your registry again, finding the CellProfilerLocal.cfg entry, right-clicking on it and deleting it. When you re-open CP 2.1, things should work as long as you don’t revert back to 2.0 (but if you do, rename the pipeline to start with some other letter). First-time 2.1 users shouldn’t run into this problem.

Regards,
-Mark

Hi Mark,
Thank you so much, that fixed it! Sorry to be off topic, but did the thresholding algorithms change at all? I’m getting less objects as in the previous version when using the same exact image. (I can start a new post if you need anything from me)
-Anne

Hi Anne,

There are some small fixes to thresholding which should not affect many images or situations (as far as we know). You can search through our Fixes-by-version list (try searching for “threshold” here) and see if any fit your thresholding situation.

But yes, if you still see a discrepancy, please do start another thread with an example image and pipeline (preferably old and new).

Thanks,
David

Hi Frank and Mark,

I likewise removed the channel tag in the regular expressions and now it works for me too. Thank you!

[quote=“mbray”]Mat, does Frank’s solution clear up your problem as well?
-Mark[/quote]

Yes it does! Thank you.

-Mat

Anne: I answered your follow-up post over in that thread: Thresholding discrepency in converted pipeline
Mat: Good to hear that things are working now :smile:
-Mark

Hi guys,

I’m having the same problem as Mat and Frank. Running CellProfiler 2.1 on Win7 64bit.
The project runs well in test mode but upon hitting “Analyze images” I get the following errors:

Failure in analysis startup.
Traceback (most recent call last):
File “cellprofiler\gui\pipelinecontroller.pyc”, line 2093, in on_analyze_images
File “cellprofiler\analysis.pyc”, line 113, in start
File “cellprofiler\analysis.pyc”, line 190, in init
File “cellprofiler\pipeline.pyc”, line 679, in copy
File “cellprofiler\pipeline.pyc”, line 856, in load
File “cellprofiler\pipeline.pyc”, line 1143, in loadtxt
File “cellprofiler\pipeline.pyc”, line 549, in read_image_plane_details
TypeError: init() got multiple values for keyword argument ‘channel’

Exception in CellProfiler core processing
Traceback (most recent call last):
File “cellprofiler\gui\pipelinecontroller.pyc”, line 2104, in on_analyze_images
File “cellprofiler\gui\pipelinecontroller.pyc”, line 2498, in stop_running
File “cellprofiler\analysis.pyc”, line 132, in cancel
AttributeError: ‘NoneType’ object has no attribute ‘cancel’

And I get the status bar notification “Processing 0 of 1 image sets completed” forever

I tried your suggestions in the previous posts but couldn’t solve the issue.
For the sake of troubleshooting, I even disabled metadata extraction altogether. This still produced the same errors.

Can you give me a hand troubleshooting this issue?
I’m uploading an example project.

Thanks a lot,
Hugo
plate01_01.cpproj (108 KB)

Hi Hugo,

I hate to ask this, but could you post the images that you used in your project example?

Thanks,
-Mark

Hi Mark,

No problem at all. Please find the images in this post.

Thanks,
Hugo
test.zip (6.24 MB)

I believe the issue is that you are using ‘channel’ as a tag for metadata extraction from the file name in the Metadata module, but it is a reserved keyword. Change the tag to something else (like ‘channel1’ or ‘Channel’ (uppercase ‘C’)) and it works.

I’ll check into this and confirm if it’s bona fide bug.
-Mark