Importing exams broken due to missing time period
Traceback (most recent call last):
File "/usr/local/bin/aleksis-admin", line 8, in <module>
sys.exit(aleksis_cmd())
File "/usr/local/lib/python3.10/dist-packages/aleksis/core/__main__.py", line 14, in aleksis_cmd
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.10/dist-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.10/dist-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.10/dist-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.10/dist-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.10/dist-packages/aleksis/apps/untis/management/commands/untis_import_mysql.py", line 30, in handle
command.run(background=background, version=version)
File "/usr/local/lib/python3.10/dist-packages/aleksis/apps/untis/commands.py", line 46, in run
_untis_import_mysql(cls.get_terms(), school_id=school_id, version=version)
File "/usr/local/lib/python3.10/dist-packages/aleksis/apps/untis/util/mysql/main.py", line 99, in untis_import_mysql
import_exams(validity_range, time_periods_ref, subjects_ref, teachers_ref, rooms_ref)
File "/usr/local/lib/python3.10/dist-packages/aleksis/apps/untis/util/mysql/importers/exams.py", line 93, in import_exams
period = time_periods_ref[weekday][period]
KeyError: 0
My best guess is that this happens when an exam is planned for a time period that does not have a regular lesson in the plan.