exportToDatabase error duplicate column name

Hi, I am trying to run my pipeline but when exporting object features to database I have an error.
When initializing it tells me I have duplicate column name but I don’t know where to see that and what to do.

The pipeline has the following steps:

  • primary object detection
  • secondary object detection
  • convert object to image to have a labelled image
  • save it
  • measure shape and texture features
  • export to database.

Does anyone have an idea?

Thank you,

My guess is that there’s a duplication somewhere (either you’ve named two different things the same name (ie your input image for your primary objects as well as the “ConvertObjectsToImage” output image are both named “Nuclei”, or you’ve measured an object’s texture at the same scale twice), etc- without the pipeline though it’s impossible to tell. Can you go over that pipeline with a fine-toothed comb to look for such a thing, and if you don’t find it after that you can upload the pipeline here along with a set of images so that we can check for a bug.


thank you for your answer. I couldn’t find the problem so I upload the pipeline. If you have time to look at it it would be great, thank you. Maybe I also misunderstood some of the parameter.
I also put the images. There are 8 of them going 2 by 2. That can be identified with the “series” number. One is the image of the tissue and the other one the maximum intensity detected on the image. I use the second one for primary object detection.
If you have any question on the pipeline don’t hesitate.

Thank you for your help,

So from the full error message it’s easy to see what’s going on:

Traceback (most recent call last):
  File "cellprofiler\pipeline.pyc", line 2135, in prepare_run
  File "cellprofiler\modules\exporttodatabase.pyc", line 1661, in prepare_run
  File "cellprofiler\modules\exporttodatabase.pyc", line 2218, in create_database_tables
  File "cellprofiler\modules\exporttodatabase.pyc", line 255, in execute
OperationalError: duplicate column name: Image_Metadata_series

It seems it’s because you’re extracting a metadata parameter that you’re calling series, which is a no-no because it’s the same name as one of the 4 parameters of Metadata CP extracts by default- Path/URL, Frame, Series, and FileName. Renaming it to literally anything but one of those 4 will solve the issue.

It solved the problem indeed.
Thank you very much

1 Like