# Stopped by unexpected error when upgrading from Indico 1.2.2

**URL:** <https://talk.getindico.io/t/stopped-by-unexpected-error-when-upgrading-from-indico-1-2-2/862>\
**Category:** Migration from 1.2 to 2.0\
**Created:** [December 27, 2018, 1:23pm UTC](https://talk.getindico.io/t/stopped-by-unexpected-error-when-upgrading-from-indico-1-2-2/862 "2018-12-27T13:23:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kodion](https://talk.getindico.io/user_avatar/talk.getindico.io/kodion/32/173_2.png) [@kodion](https://talk.getindico.io/u/kodion)\
**Post date:** [December 27, 2018, 1:23pm UTC](https://talk.getindico.io/t/stopped-by-unexpected-error-when-upgrading-from-indico-1-2-2/862/1 "2018-12-27T13:23:19Z")

</div>

Dear Indico Team,

I am temporary admin of an Indico running at [https://indico.wacren.net](https://indico.wacren.net) and trying to upgrade using the migration from 1.2 guide.

I run the migration script as below

`indico-migrate postgresql:///indico file:///opt/indico-legacy/db/Data.fs --archive-dir /opt/indico-legacy/archive --storage-backend legacy --default-email indico@wacren.net --default-currency USD --symlink-target ~/archive/legacy_symlinks/ --symlink-backend legacy-symlinks --migrate-broken-events`

… and get the following error in the migration log pasted below

> ~$ cat /opt/indico/migration.log  
> × [global\_pre] No valid IPs found  
> ! [users] Skipping 100 - not activated  
> ! [users] Skipping 23 - not activated  
> × [users] Duplicate identity: indico, mattania. Skipping.  
> × [users] Duplicate identity: indico, aderonke. Skipping.  
> ! [users] Skipping 603 - not activated  
> ! [users] Skipping 710 - not activated  
> ! [users] Skipping 713 - not activated  
> ! [users] Skipping 714 - not activated  
> ! [users] Skipping 715 - not activated  
> ! [users] Skipping 716 - not activated  
> ! [users] Skipping 718 - not activated  
> ! [users] Skipping 719 - not activated  
> ! [users] Skipping 721 - not activated  
> ! [users] Skipping 722 - not activated  
> ! [users] Skipping 725 - not activated  
> ! [users] Skipping 728 - not activated  
> ! [users] Skipping 730 - not activated  
> ! [users] Skipping 743 - not activated  
> ! [users] Skipping 749 - not activated  
> ! [users] Skipping 773 - not activated  
> ! [users] Skipping 774 - not activated  
> ! [users] Skipping 783 - not activated  
> ! [users] Skipping 784 - not activated  
> ! [users] Skipping 785 - not activated  
> ! [users] Skipping 786 - not activated  
> ! [users] Skipping 791 - not activated  
> ! [users] Skipping 796 - not activated  
> ! [users] Skipping 798 - not activated  
> ! [users] Skipping 804 - not activated  
> ! [users] Skipping 819 - not activated  
> ! [users] Skipping 828 - not activated  
> ! [users] Skipping 841 - not activated  
> ! [users] Skipping 852 - not activated
> 
> ```auto
> Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:11 [<module>]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/cli.py:126 [main]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py:722 [__call__]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py:697 [main]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py:895 [invoke]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/click/core.py:535 [invoke]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/cli.py:122 [cli]
> debug=debug, **kwargs)
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/migrate.py:106 [migrate]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/importer.py:161 [run]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/steps/users_groups.py:73 [migrate]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/util.py:323 [_f]
> |/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/steps/users_groups.py:253 [migrate_admins]
> user = self.global_ns.avatar_merged_user[avatar.id]
> 
> ```
> 
> ‘1’

I am not sure how to proceed and grateful for any clue to proceed with the upgrade.

Many thanks  
Omo

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [December 27, 2018, 1:28pm UTC](https://talk.getindico.io/t/stopped-by-unexpected-error-when-upgrading-from-indico-1-2-2/862/2 "2018-12-27T13:28:31Z")

</div>

> <https://github.com/indico/indico-migrate/blob/master/indico_migrate/steps/users_groups.py#L254>

This should catch `KeyError` instead of `ValueError`. You can edit it directly in `/opt/indico/.venv/local/lib/python2.7/site-packages/indico_migrate/steps/users_groups.py`; please let me know and I’ll release an updated indico-migrate package containing the fix.

---

<div class="post-metadata">

**Author:** ![kodion](https://talk.getindico.io/user_avatar/talk.getindico.io/kodion/32/173_2.png) [@kodion](https://talk.getindico.io/u/kodion)\
**Post date:** [December 27, 2018, 2:08pm UTC](https://talk.getindico.io/t/stopped-by-unexpected-error-when-upgrading-from-indico-1-2-2/862/3 "2018-12-27T14:08:42Z")

</div>

Thanks a lot. The fix worked. Migration succeeded after the edit.
