Skip to content

Instantly share code, notes, and snippets.

@trang
Created December 14, 2014 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trang/301a01beca5712693a74 to your computer and use it in GitHub Desktop.
Save trang/301a01beca5712693a74 to your computer and use it in GitHub Desktop.
IntegrityError: (1062, "Duplicate entry '3253-401801' for key 'list_id'")
Running full scan at 2014-12-14 05:58 AM UTC
Running full table scan in 10 queries
Running duplicate filtering on sentence range: [1L, 369159L]
OK
Running duplicate filtering on sentence range: [369160L, 738318L]
OK
Running duplicate filtering on sentence range: [738319L, 1107477L]
OK
Running duplicate filtering on sentence range: [1107478L, 1476636L]
OK
Running duplicate filtering on sentence range: [1476637L, 1845795L]
OK
Running duplicate filtering on sentence range: [1845796L, 2214954L]
OK
Running duplicate filtering on sentence range: [2214955L, 2584113L]
OK
Running duplicate filtering on sentence range: [2584114L, 2953272L]
OK
Running duplicate filtering on sentence range: [2953273L, 3322431L]
OK
Running duplicate filtering on sentence range: [3322432L, 3691590L]
OK
OK full table scan and filtering done 3502251 duplicate sets found
Running deduplication step
Deduplication: 0% doneTraceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/var/www-dev/docs/tatoeba2-django/tatoeba2/management/commands/deduplicate.py", line 576, in handle
self.deduplicate(main_sent, ids, post_cmnt, dry)
File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 394, in inner
return func(*args, **kwargs)
File "/var/www-dev/docs/tatoeba2-django/tatoeba2/management/commands/deduplicate.py", line 364, in deduplicate
cls.update_merge('SentencesSentencesLists', main_sent.id, ids)
File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 394, in inner
return func(*args, **kwargs)
File "/var/www-dev/docs/tatoeba2-django/tatoeba2/management/commands/deduplicate.py", line 270, in update_merge
get_model('tatoeba2.'+model).objects.filter(**{update_fld+'__in': ids}).update(**{update_fld: main_id})
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 583, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 1004, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 128, in execute
return self.cursor.execute(query, args)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.IntegrityError: (1062, "Duplicate entry '3253-401801' for key 'list_id'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment