Here are the last lines from migration.log before crash:
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Email"
(registrant 0)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Institu
tion" (registrant 0)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Country
of Personal Address" (registrant 0)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "City of
Personal Address" (registrant 0)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Email"
(registrant 1)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Institu
tion" (registrant 1)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Country
of Personal Address" (registrant 1)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "City of
Personal Address" (registrant 1)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Email"
(registrant 2)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Institu
tion" (registrant 2)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "Country
of Personal Address" (registrant 2)
! 13348 regform Skipping invalid data (field id mismatch) for obsolete version of "City of
Personal Address" (registrant 2)
! 13362 menus Skipping link "Come raggiungere i LNF" with no URL
! 13362 menus Skipping link "Accesso alla rete" with no URL
! 1344 timetable Block boundary (end violated; extending block from 2009-05-11 11:00:00+00:00 to 2009-05-11 13:00:00+00:00)
! 1345 menus Skipping top-level menu entry program_my_tracks
! 13450 regform Email matches another user; associating <Registration(None, registration_form_id=None, lizheng_880606@163.com, None, is_deleted=None): "Zheng Li"> with <User(27262, lizheng_880606@163.com, is_deleted=True): "Lee Zheng"> instead of <persistent broken MaKaC.user.Avatar instance '\x00\x00\x00\x00\x0c\xe0j\x1c'>
× 13450 abstract Legacy contribution type not found: <persistent broken MaKaC.conference.ContributionType instance '\x00\x00\x00\x00\x0b\xf9)\xaf'>
× 13450 abstract Legacy contribution type not found: <persistent broken MaKaC.conference.ContributionType instance '\x00\x00\x00\x00\x0b\xf9)\xb0'>
! 13450 abstract No contrib type data, using any [{'_tpl': <persistent broken MaKaC.review.NotificationTemplate instance '\x00\x00\x00\x00\x0c\xfd\xe5\x1b'>, '_id': 0, '__Broken_newargs__': ()}]
===========================================================
I tried with db.session.flush() inside the loop (at the end) and it crash a little before:
Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:11 [<module>]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py:126 [main]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:722 [__call__]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:697 [main]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:895 [invoke]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:535 [invoke]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py:122 [cli]
debug=debug, **kwargs)
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/migrate.py:106 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/importer.py:161 [run]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/util.py:323 [_f]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:183 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:211 [migrate_event_data]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:137 [run_step]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/__init__.py:83 [run]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/abstracts.py:115 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/abstracts.py:454 [_migrate_abstracts]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py:157 [do]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2192 [flush]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2312 [_flush]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py:66 [__exit__]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2276 [_flush]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:389 [execute]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:548 [execute]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py:181 [save_obj]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py:835 [_emit_insert_statements]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:945 [execute]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:263 [_execute_on_connection]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1053 [_execute_clauseelement]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1189 [_execute_context]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1402 [_handle_dbapi_exception]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py:203 [raise_from_cause]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1182 [_execute_context]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py:470 [do_execute]
cursor.execute(statement, parameters)
(psycopg2.IntegrityError) new row for relation "abstracts" violates check constraint "ck_abstracts_duplicate_of_id_only_duplicate"
DETAIL: Failing row contains (2349, 8, 12289, Highlights from heavy-flavour physics measurements with ATLAS de..., 3740, null, 2017-03-07 11:56:27.37528, null, null, 6, , 523, , 2017-03-24 08:58:53.746078, null, null, null, null, f, Abstract: The study of the heavy-flavours dynamics within the St...).
[SQL: 'INSERT INTO event_abstracts.abstracts (friendly_id, event_id, title, submitter_id, submitted_contrib_type_id, submitted_dt, modified_by_id, modified_dt, state, submission_comment, judge_id, judgment_comment, judgment_dt, accepted_track_id, accepted_contrib_type_id, merged_into_id, duplicate_of_id, is_deleted, description) VALUES (%(friendly_id)s, %(event_id)s, %(title)s, %(submitter_id)s, %(submitted_contrib_type_id)s, %(submitted_dt)s, %(modified_by_id)s, %(modified_dt)s, %(state)s, %(submission_comment)s, %(judge_id)s, %(judgment_comment)s, %(judgment_dt)s, %(accepted_track_id)s, %(accepted_contrib_type_id)s, %(merged_into_id)s, %(duplicate_of_id)s, %(is_deleted)s, %(description)s) RETURNING event_abstracts.abstracts.id'] [parameters: {'modified_dt': None, 'is_deleted': False, 'description': u'Abstract: The study of the heavy-flavours dynamics within the Standard Model (SM) is one of the most intriguing areas in modern Particle Physics. Se ... (333 characters truncated) ... are decays processes involving B-mesons and to CP-violation measurements, which represent real windows towards any New Physics process beyond the SM.', 'title': u'Highlights from heavy-flavour physics measurements with ATLAS detector', 'event_id': 12289, 'accepted_track_id': None, 'merged_into_id': None, 'judgment_comment': u'', 'submitter_id': 3740, 'accepted_contrib_type_id': None, 'state': <AbstractState.duplicate: 6>, 'submission_comment': u'', 'submitted_contrib_type_id': None, 'submitted_dt': datetime.datetime(2017, 3, 7, 11, 56, 27, 375280), 'modified_by_id': None, 'judgment_dt': datetime.datetime(2017, 3, 24, 8, 58, 53, 746078), 'friendly_id': 8, 'duplicate_of_id': None, 'judge_id': 523}]
==========================================================
With the db.session.flush() outside the loop (at the end), the error is:
Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:11 [<module>]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py:126 [main]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:722 [__call__]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:697 [main]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:895 [invoke]
|/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:535 [invoke]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py:122 [cli]
debug=debug, **kwargs)
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/migrate.py:106 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/importer.py:161 [run]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/util.py:323 [_f]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:183 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:211 [migrate_event_data]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:137 [run_step]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/__init__.py:83 [run]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/abstracts.py:115 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/abstracts.py:454 [_migrate_abstracts]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py:157 [do]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2192 [flush]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2312 [_flush]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py:66 [__exit__]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2276 [_flush]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:384 [execute]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:481 [execute_aggregate]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:548 [execute]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py:181 [save_obj]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py:835 [_emit_insert_statements]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:945 [execute]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:263 [_execute_on_connection]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1053 [_execute_clauseelement]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1189 [_execute_context]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1402 [_handle_dbapi_exception]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py:203 [raise_from_cause]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py:1182 [_execute_context]
|/opt/indico/.venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py:470 [do_execute]
cursor.execute(statement, parameters)
(psycopg2.IntegrityError) new row for relation "abstract_reviews" violates check constraint "ck_abstract_reviews_prop_abstract_id_only_duplicate_merge"
DETAIL: Failing row contains (354, 2370, 523, 149, 2017-03-24 08:58:53.747417, null, duplicate of #9, 4, null, null).
[SQL: 'INSERT INTO event_abstracts.abstract_reviews (abstract_id, user_id, track_id, created_dt, modified_dt, comment, proposed_action, proposed_related_abstract_id, proposed_contribution_type_id) VALUES (%(abstract_id)s, %(user_id)s, %(track_id)s, %(created_dt)s, %(modified_dt)s, %(comment)s, %(proposed_action)s, %(proposed_related_abstract_id)s, %(proposed_contribution_type_id)s) RETURNING event_abstracts.abstract_reviews.id'] [parameters: {'comment': u'duplicate of #9', 'modified_dt': None, 'user_id': 523, 'proposed_contribution_type_id': None, 'abstract_id': 2370, 'track_id': 149, 'created_dt': datetime.datetime(2017, 3, 24, 8, 58, 53, 747417), 'proposed_action': <AbstractAction.mark_as_duplicate: 4>, 'proposed_related_abstract_id': None}]
Last lines of migration.log were:
× 12289 abstract Legacy contribution type not found: --any--
! 12289 abstract No contrib type data, using any [{'_tpl': <persistent broken MaKaC.review.
NotificationTemplate instance '\x00\x00\x00\x00\x0b\xddb\xe5'>, '_id': 0, '__Broken_newargs__':
()}]
Thank you!