Bug 49561 - Import Script for Groups Fails With Traceback
Import Script for Groups Fails With Traceback
Status: RESOLVED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
https://docs.software-univention.de/u...
:
Depends on: 49318
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-28 13:22 CEST by Christian Völker
Modified: 2023-06-23 13:15 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.137
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Völker univentionstaff 2019-05-28 13:22:40 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.
Comment 1 Jürn Brodersen univentionstaff 2019-05-28 14:19:37 CEST
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.
Comment 2 Christian Völker univentionstaff 2019-05-28 14:47:25 CEST
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!
Comment 3 Daniel Tröder univentionstaff 2019-05-28 14:57:13 CEST
(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.
Comment 4 Christian Völker univentionstaff 2019-05-28 15:32:11 CEST
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?
Comment 5 Michel Smidt 2019-05-31 10:47:24 CEST
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.
Comment 6 Jan-Luca Kiok univentionstaff 2023-06-23 13:15:27 CEST
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.