Univention Bugzilla – Bug 42412
ucs-school-import output is user unfriendly
Last modified: 2016-09-15 15:42:09 CEST
1. The default is that verbose is enabled. You have to manually set --set verbose=false - which doesn't even have the effect that it is not verbose as there is still a lot of things written into stdout (see 3.). 2. Tracebacks are printed to stdout Entry #0: ValidationError when adding ImportStudent(name='A.Meyer4', school='gsmitte', dn='uid=A.Meyer4,cn=schueler,cn=users,ou=gsmitte,dc=school,dc=local', old_dn=None) (source_uid:NewDB record_uid: anton1@nstx.local): {'school': ['The school "schule1" does not exist. Please choose an existing one or create it.']} Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 131, in create_and_modify_users success = user.create(lo=self.connection) File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 150, in create return super(ImportUser, self).create(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 417, in create success = self.create_without_hooks(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 153, in create_without_hooks success = super(ImportUser, self).create_without_hooks(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 443, in create_without_hooks self.do_create(udm_obj, lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 229, in do_create udm_obj['groups'] = self.groups_used(lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 461, in groups_used self.get_or_create_group_udm_object(group_dn, lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 475, in get_or_create_group_udm_object group.create(lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 417, in create success = self.create_without_hooks(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 430, in create_without_hooks raise ValidationError(self.errors.copy()) UserValidationError: ValidationError when adding ImportStudent(name='A.Meyer4', school='gsmitte', dn='uid=A.Meyer4,cn=schueler,cn=users,ou=gsmitte,dc=school,dc=local', old_dn=None) (source_uid:NewDB record_uid: anton1@nstx.local): {'school': ['The school "schule1" does not exist. Please choose an existing one or create it.']} 3. There are many programmatic output messages: Using command line arguments: {'input': {'filename': 'new-format-userimport.csv'}, 'verbose': False, 'user_role': 'student'} Configuration is: {u'activate_new_users': {u'default': True}, u'classes': {}, … 20 more lines … Adding ImportStudent(name='A.Meyer4', school='gsmitte', dn='uid=A.Meyer4,cn=schueler,cn=users,ou=gsmitte,dc=school,dc=local', old_dn=None) (source_uid:NewDB record_uid:anton1@nstx.local) attributes={'$dn$': 'uid=A.Meyer4,cn=schueler,cn=users,ou=gsmitte,dc=school,dc=local', 'display_name': 'Anton Meyer', 'record_uid': u'anton1@nstx.local', 'firstname': 'Anton', 'lastname': 'Meyer', 'type_name': 'Student', 'school': 'gsmitte', 'name': 'A.Meyer4', 'disabled': 'none', 'email': u'anton1@nstx.local', 'birthday': None, 'type': 'importStudent', 'sc hools': ['gsmitte', 'schule1'], 'password': '%8x2MFR+s@Z:$(q', 'source_uid': u'NewDB', 'school_classes': {'gsmitte': ['gsmitte-1A']}, 'objectType': 'users/user'} udm_properties={u'phone': [u''], u'rid': u'anton1@nstx.local', 'overridePWHistory': '1', u'description': u'Dies ist ein Sch\xfcler', 'overridePWLength': '1'}...
*** This bug has been marked as a duplicate of bug 41651 ***