Indico 1.2 indico-migrate events error

When running script, I am receiving following error:

Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:8 [<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/misc.py:90 [migrate]
 si = self.conf._supportInfo

'Conference' object has no attribute '_supportInfo'

Indico 1.2.1 - 2.0
Centos 7.9
pip 20.3.4
Python 2.7.5

Could you please help?

Ty

Edit /opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/misc.py and replace this line:

        si = self.conf._supportInfo

with this:


        try:
            si = self.conf._supportInfo
        except AttributeError:
            return

Awesome! but when I run, got another error… I have to admit, It was difficult to get into that point, its instance that has been running without any touch.

Now am I stuck at this point

Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:8 [] ││
|/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) group member type: Group ││
|/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]│✓ [users] Added new system user: <User(1143, None): “Indico System”> ││
|/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:112 [migrate]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/abstracts.py:311 [_migrate_email_templates]
reply_to_address = strict_sanitize_email(self.conf._supportInfo._email, self.default_email)

‘Conference’ object has no attribute ‘_supportInfo’

Replace indico_migrate/steps/events/abstracts.py line 311 with this:

try:
    reply_to_address = strict_sanitize_email(self.conf._supportInfo._email, self.default_email)
except AttributeError:
    reply_to_address = self.default_email

If you would be interested, we could make a online meet to dig into it in realtime…

Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:8 [] ││
|/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:194 [migrate_event_data]
|/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/events/importer.py:39 [_get_all_steps]
from indico_migrate.steps.events.abstracts import EventAbstractImporter

expected an indented block (abstracts.py, line 312)

that sounds like you didn’t preserve the original indentation level when changing the file. fixing that should be enough to make it work

You’re right :slight_smile: Thank you for the help.