Problem: The user import shows a validation error traceback but the referenced name is notthe problem

Problem:
The ucsschool user import shows the following message
'name': ['Value must not contain anything other than digits, letters, dots or spaces, must be at least 2 characters long, and start and end with a digit or letter!']}

2019-06-07 03:01:06 ERROR user_import.create_and_modify_users:211  Entry #0: ValidationError when adding ImportStudent(name='liz.s2', school='school', dn='uid=liz.s2,cn=schueler,cn=users,ou=school,dc=schein,dc=me', old_dn=None) (source_uid:users-school record_uid: {0E4CEA2A-11C3-4742-5948-A067E825D9B3}): {'name': ['Value must not contain anything other than digits, letters, dots or spaces, must be at least 2 characters long, and start and end with a digit or letter!']}
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 178, in create_and_modify_users
    success = user.create(lo=self.connection)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 317, in create
    res = super(ImportUser, self).create(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 458, in create
    success = self.create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 486, in create_without_hooks
    self.do_create(udm_obj, lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 235, in do_create
    udm_obj['groups'] = self.groups_used(lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 477, 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 491, in get_or_create_group_udm_object
    group.create(lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 458, in create
    success = self.create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/group.py", line 196, in create_without_hooks
    success = super(SchoolClass, self).create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 473, in create_without_hooks
    raise ValidationError(self.errors.copy())
UserValidationError: ValidationError when adding ImportStudent(name='liz.s2', school='school', dn='uid=liz.s2,cn=schueler,cn=users,ou=school,dc=schein,dc=me', old_dn=None) (source_uid:users-school record_uid: {0E4CEA2A-11C3-4742-5948-A067E825D9B3}): {'name': ['Value must not contain anything other than digits, letters, dots or spaces, must be at least 2 characters long, and start and end with a digit or letter!']}
2019-06-07 03:01:06 ERROR mass_import.import_users:123  More than 0 errors.
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/mass_import.py", line 120, in import_users
    user_import.create_and_modify_users(imported_users)  # 90% - 100%
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 212, in create_and_modify_users
    self._add_error(exc)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 629, in _add_error
    raise TooManyErrors("More than {} errors.".format(self.config["tolerate_errors"]), self.errors)
TooManyErrors: More than 0 errors.

Solution:

The name is not misspelled according to the given conditions.
Looking deeper into the traceback you see also the group.py
File “/usr/lib/pymodules/python2.7/ucsschool/lib/models/group.py”, line 196, in create_without_hooks
success = super(SchoolClass, self).create_without_hooks(lo, validate)
File “/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py”, line 473, in create_without_hooks
raise ValidationError(self.errors.copy())

This indicates that it may not the name of the student that is misspelled, but the class in which he is to be accepted.
You should also check the name of the class.

Mastodon