CellProfiler/CellProfiler — Issue #304: ExportToDatabase: Error on duplicate entries in experiment table creation
Author: braymp
Created: 2012-03-09 21:04:17+00:00
State: open
Labels: Bug, Next

These errors occurred with the trunk build. I've seen it before but have not been able to replicate it until now.

--------------------------------------------------------------------
test_07_01_well_single_objtable
Class:	nosetests

Traceback (most recent call last):
File "c:\Python27\lib\unittest\case.py", line 318, in run
testMethod()
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\tests\test_exporttodatabase.py", line 2818, in test_07_01_well_single_objtable
module.prepare_run(workspace)
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\exporttodatabase.py", line 1260, in prepare_run
self.create_database_tables(self.cursor, workspace)
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\exporttodatabase.py", line 1578, in create_database_tables
execute(cursor, statement)
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\exporttodatabase.py", line 211, in execute
cursor.execute(query)
File "c:\Python27\lib\site-packages\MySQLdb\cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "c:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry '33083-Object-class_table' for key 'PRIMARY'")

------------------------------------------------------------------

test_11_02_experiment_table_separate

Traceback (most recent call last):
File "c:\Python27\lib\unittest\case.py", line 318, in run
testMethod()
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\tests\test_exporttodatabase.py", line 3455, in test_11_02_experiment_table_separate
module.prepare_run(workspace)
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\exporttodatabase.py", line 1260, in prepare_run
self.create_database_tables(self.cursor, workspace)
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\exporttodatabase.py", line 1578, in create_database_tables
execute(cursor, statement)
File "x:\projects\CellProfiler\trunk\CellProfiler\cellprofiler\modules\exporttodatabase.py", line 211, in execute
cursor.execute(query)
File "c:\Python27\lib\site-packages\MySQLdb\cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "c:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry '33109-myobject-classifier_ignore_columns' for key 'PRIMARY'")

------------------------------------------------------
When this has happened to me, I've resolved it by deleting the offending rows in the experiment table and re-running.