Univention Bugzilla – Bug 49561
Import Script for Groups Fails With Traceback
Last modified: 2023-06-23 13:15:27 CEST
Trying to import classes: root@master:~# /usr/share/ucs-school-import/scripts/import_group klassen.csv infile is : klassen.csv Traceback (most recent call last): File "/usr/share/ucs-school-import/scripts/import_group", line 3247, in <module> import_group() File "/usr/share/ucs-school-import/scripts/import_group", line 2433, in import_group Descrpt = parsed[3] IndexError: list index out of range root@master:~# wc -l klassen.csv 48 klassen.csv root@master:~# head -n 2 klassen.csv A SchuleLena SchuleLena-1n A SchuleLena SchuleLena-2h I followed the documentation available at URL. At least we should print a more informative error instead of a non-useable traceback.
The file is missing a tab at the end of each line. The description is optional but not the actual field for the description. I agree that the error message and docu could be more clear, but a 0.7 user pain seems a bit high.
Indeed, the tab was missing. A customer following 100% our docs will be totally frustrated as it simply is not working as it should and no useable error messages appear. Needing a tab at the end of the line when there is a optional (!) field empty is more than unusual. ANY customer trying to import classes based on documentation will fail here. Importing classes appears to be a key scenario, isn't it? Even more for ucs@school this is part of the initial setup procedure, am I right? Customers might have descriptions for classes, but a few will not. For those who are trying to import classes it is a showstopper on daily work!
(In reply to Christian Völker from comment #2) > Even more for > ucs@school this is part of the initial setup procedure, am I right? Not really. They usually manage classes indirectly by importing users (with a CSV file containing a 'school_classes' column). But I agree, that the import script should be more careful and explicit about the columns of the input file. It is however not a setup problem. That would only be the case, if the import could not be installed. It is also not blocking daily work, as the class import happens only once per year, if ever.
Ok, got it. In this case we should definitely raise the priority of the documentation bug #49318 as this is the first layer customers use. I can not believe we have such a hughe issue in the documentation for more than a month! So when everything goes through importing users why are the outdated scripts still provided?
In my experience, Daniel is right. In almost all cases, classes are implicitly created by the user import. As suggested by Christian I have set the priority of bug #49318 even higher.
This issue has been filed against UCS 4.4. UCS 4.4 is out of maintenance and UCS components may have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.