Problem: You get a traceback if you open classes


You get a traceback if you open classes in the umc

Interner Server-Fehler in "schoolusers/query (student)".
Request: schoolusers/query (student)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/", line 260, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/", line 181, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolusers/", line 90, in query
    attr=['givenName', 'sn', 'shadowLastChange', 'shadowMax', 'uid'])
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/", line 531, in _users_ldap
    ldap_objs =, base=userdn, attr=attr)
  File "/usr/lib/pymodules/python2.7/univention/admin/", line 755, in search
    raise univention.admin.uexceptions.noObject(_err2str(msg))
noObject: No such object


The traceback shows, that a user is in two classes but he is not on both schools.

A user who is in two classes on two different schools has to be set in both schools
(usermodule in tab ucs@school)


For more debugging to find the user who is effected:
This is just for admins who really know what they are doing!


root@master:~# diff -Nuar /usr/share/pyshared/ucsschool/lib/{.orig-support,}
--- /usr/share/pyshared/ucsschool/lib/    2019-10-23 12:23:19.267827645 +0200
+++ /usr/share/pyshared/ucsschool/lib/    2019-10-23 12:25:37.253558595 +0200
@@ -528,7 +528,10 @@
                             [parse(subfilter) for subfilter in search_filter_list]
-                    ldap_objs =, base=userdn, attr=attr)
+                    try:
+                        ldap_objs =, base=userdn, attr=attr)
+                    except Exception:
+                        raise Exception(userdn)
                     if len(ldap_objs) == 1:
                     # else: