Error message - my fault or bug?

Hello,

I’ve been working with CP 2.0 for more than a year now and was doing some adjustements to a pipeline that actually ran pretty well (already had 35.000 images calculated with about 1 min time for each, so it did run some time …). However after CP is done calculating one set of images (1350) and the only thing left done is to export the data, I get the following error message. The csv files are not saved except the VSMCNuclei.csv

Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 1268, in post_run
File “cellprofiler\modules\exporttospreadsheet.pyc”, line 390, in post_run
File “cellprofiler\modules\exporttospreadsheet.pyc”, line 439, in run_objects
File “cellprofiler\modules\exporttospreadsheet.pyc”, line 740, in make_object_file
TypeError: int() argument must be a string or a number, not ‘NoneType’

The funny part is, I applied small changes in other modules, but I didn’t mess around with the data part. I copied a few example images and tried the pipeline, since I don’t want to wait a day again to see if it CAN work and yet it did. No problems at all, only when I have it run on all 1350 pictures. However, I’ve always had this amount of data and it used to work.

So can could you please help me to understand what that error means?

I only included the pipeline, let me know if you need example images as well.

Thanks a lot, Matthias Roeper
Pipeline 20111128-180.cp (23.6 KB)

Hi Matthias,

I’m not completely sure, but I’ve managed to replicate a similar error via the use of the FlagImage module. I think what is happening is that since you have set FlagImage to skip when an image is flagged, an object count is failing to be written for that image, which is causing an error when ExportToSpreadsheet reaches it.

This would indeed be a bug but it seems to have been fixed since the release in our source code. A workaround in the release version would be not to skip images in FlagImages. Alternately, if you’re daring, you can try it out with our latest public build from source code here which has the bugfix. The trunk build is not as heavily vetted as our releases, so you should take that into account; please note the caveats mentioned on the page linked.

Regards,
-Mark

Thank you for your quick answer. I tried a few things and you are right about the flag image module.

By the way, the single csv file is written, but empty … and it doesn’t depend on the number of images calculated, but if I got a poor quality image within the examples.

I am using the measure image quality module to check for blur (out of focus images), so I can eliminate them prior to running the rest of the pipeline. I need such a thing, because not doing so will result in a few hundred oof images that mess up my data. Is there any way to work around this? After all the measure image quality module is intended to help with such thiings. The difference is, I need the bad pictures eliminated from the pool before doing anything else.

Concerning the source code: I am a Med student and have basic knowledge to read my E-Mails, set a up a decent workstation or construct a 30 Module CP Pipeline. However, I neither have a clue about coding, nor the use of all the programs mentioned in your wiki. And I lack time and skill to get the proper know-how. But if you’ve already identified the bug, shouldn’t there be a single file that I could replace in the installed version on my PC? Besides, I am running the most recent version of CP (10997) - when are you going to release the next one?

Thanks a lot for your help again,

Matthias Roeper

Hello again,

I hope you had a nice Christmas. I dont want to be impolite but I would like to ask if you’d find some time to help me again, since I have not gotten a reply to my last post yet. Thank you a lot.

Matthias Roeper

Unfortunately, no. Incorporating bugfixes require a new installation, as it stands now.

We don’t have a time line for the next release. But are you saying that you cannot/could not use the “bleeding-edge” with the bugfix from this page?

Regards,
-Mark

[quote=“mbray”]But are you saying that you cannot/could not use the “bleeding-edge” with the bugfix from this page?

Regards,
-Mark[/quote]

I didn’t find that download, but ended up in more complex sections :smiley: Thanks for pointing that out. I downloaded and installed this version - however, I just had another testrun with the same pipeline and yet still get the same error :confused:

Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 1525, in post_run
File “cellprofiler\modules\exporttospreadsheet.pyc”, line 406, in post_run
File “cellprofiler\modules\exporttospreadsheet.pyc”, line 460, in run_objects
File “cellprofiler\modules\exporttospreadsheet.pyc”, line 762, in make_object_file
TypeError: int() argument must be a string or a number, not ‘NoneType’

So couldn’t this easily be fixed by putting a “zero” for the missing data in those excel files? Or is there another way to filter the images baased on blur/autofocus prior to calculating the rest?

Best regards, Matthias

Hi Matthias,

I stand corrected; the bug was still outstanding. I’ve fixed it; go ahead and use the latest trunk build if you wish to do so (look for CellProfiler_2.0_r20120116224209 for your OS).

Regards,
-Mark

This issue has been resolved in CellProfiler 2.1 and later, new releases of which can now be downloaded from http://cellprofiler.org.