Importing lesson fails with , in subject name
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/celery/app/trace.py", line 451, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/celery/app/trace.py", line 734, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/tasks.py", line 11, in _task
import_command.run(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/commands.py", line 38, in run
_untis_import_mysql(cls.get_terms(), version=version)
File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/util/mysql/main.py", line 60, in untis_import_mysql
import_lessons(
File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/util/mysql/importers/lessons.py", line 98, in import_lessons
class_ids = untis_split_third(el[17], conv=int)
IndexError: list index out of range
LessonElement2
begins with: 49~0~302~7r;~0;~0~0~175608~~~~~"Freiraum: Naturwissenschaften, Fokus Physik"~"Nawi"~~n~~;11;12;13;14;15;16;17;
The subject name contains a ,
, which is used for splitting time data in the importer, so the entry is cut off here.
Probably, the parse should use a CSV parser for splitting in all cases instead of split
.