Bug 44546 - ValueError: list.remove(x): x not in list
ValueError: list.remove(x): x not in list
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 4.2
Other Linux
: P5 normal (vote)
: UCS@school 4.2 v2
Assigned To: Florian Best
Daniel Tröder
Depends on: 41994
  Show dependency treegraph
Reported: 2017-05-05 13:34 CEST by Florian Best
Modified: 2017-06-23 13:32 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017042621000132, 2017042421000083, 2017042421000136
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-05-05 13:34:21 CEST
Please fix this bug for UCS@school 4.2, too.

+++ This bug was initially created as a clone of Bug #41994 +++

Reported twice:
Version: 4.1-3 errata234 (Vahr)

Die Ausführung des Kommandos schoolwizards/users/remove schoolwizards/users ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/schoolwizards/__init__.py", line 112, in _decorated
    ret = func(self, request, *a, **kw)
  File "%PY2.7%/ucsschool/lib/schoolldap.py", line 140, in wrapper_func
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/schoolwizards/__init__.py", line 252, in delete_user
    success = obj.remove_from_school(school, ldap_user_write)
  File "%PY2.7%/ucsschool/lib/models/user.py", line 439, in remove_from_school
    (self.schools or [school]).remove(school)
ValueError: list.remove(x): x not in list
Comment 1 Florian Best univentionstaff 2017-05-05 13:38:30 CEST
ucs-school-lib (10.0.2-1):
r79116 | Bug #44546: fix an error during removing users from school

r79117 | YAML Bug #44546
Comment 2 Daniel Tröder univentionstaff 2017-05-21 12:09:39 CEST
list.remove() does not raise IndexError, only ValueError: https://docs.python.org/2/library/stdtypes.html#mutable-sequence-types
Comment 3 Florian Best univentionstaff 2017-05-22 14:25:11 CEST
ucs-school-lib (10.0.2-2):
r79501 | Bug #44546: only catch ValueError
Comment 4 Daniel Tröder univentionstaff 2017-05-22 18:57:00 CEST
OK: code
r79525: update advisory
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2017-06-23 13:32:23 CEST
UCS@school 4.2 v2 has been released.


If this error occurs again, please clone this bug.