mitodl/mitxonline

Exception openedx.tasks.repair_faulty_openedx_users

Opened this issue · 0 comments

The edx error message doesn't make any sense. The username doesn't only has letters in it: https://mitxonline.mit.edu/admin/users/user/164435

Sentry Issue: MITXONLINE-3Q0

OpenEdxUserCreateError: Error creating Open edX user. Response - code: 400, content: {
  "username": [
    {
      "user_message": "Usernames can only contain letters, numerals, and @/./+/-/_ characters."
    }
  ],
  "error_code": "validation-error"
}
  File "openedx/api.py", line 348, in repair_faulty_edx_user
    created_user = create_edx_user(user)
  File "openedx/api.py", line 140, in create_edx_user
    raise OpenEdxUserCreateError(

Exception: 
  File "openedx/api.py", line 392, in repair_faulty_openedx_users
    created_user, created_auth_token = repair_faulty_edx_user(user)
  File "openedx/api.py", line 356, in repair_faulty_edx_user
    raise Exception from e  # noqa: TRY002

Failed to repair faulty user smorenojauregui (smorenojauregui@gmail.com)