Last modified: 2014-05-29 14:24:27 UTC
If usernames pasted into the Paste Usernames box include any utf-8 characters, they cannot be uploaded. The error message is: "Error! Server error while processing your upload" Here are some example usernames that cannot be uploaded via Paste Usernames: محمد الفلسطيني אצטרובל José Puigjaner
Thanks Sage. We're all in Zurich until the 12th but we'll try to fix this soon. Here's the familiar dreaded stack trace that confirms the problem (collected while pasting the usernames in your bug description): [Tue May 06 16:50:15 2014] [error] 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128) [Tue May 06 16:50:15 2014] [error] Traceback (most recent call last): [Tue May 06 16:50:15 2014] [error] File "/srv/wikimetrics/wikimetrics/controllers/cohorts.py", line 178, in cohort_upload [Tue May 06 16:50:15 2014] [error] form.parse_records() [Tue May 06 16:50:15 2014] [error] File "/srv/wikimetrics/wikimetrics/controllers/forms/cohort_upload.py", line 51, in parse_records [Tue May 06 16:50:15 2014] [error] self.records = parse_records(unparsed, self.project.data) [Tue May 06 16:50:15 2014] [error] File "/srv/wikimetrics/wikimetrics/controllers/forms/cohort_upload.py", line 83, in parse_records [Tue May 06 16:50:15 2014] [error] 'username' : parse_username(username), [Tue May 06 16:50:15 2014] [error] File "/srv/wikimetrics/wikimetrics/utils.py", line 231, in parse_username [Tue May 06 16:50:15 2014] [error] username = str(username) [Tue May 06 16:50:15 2014] [error] UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Thanks Dan. This is not an urgent bug for me or other education program folks, because we mainly use the text file method for uploading cohorts. I just happened across it while working on an API to make it easier to pull lists of students out of the Education Program extension.
Change 134397 had a related patch set uploaded by Nuria: Can upload names with utf-8 characters via "Paste Usernames" textbox https://gerrit.wikimedia.org/r/134397
Change 134397 merged by Milimetric: Can upload names with utf-8 characters via "Paste Usernames" textbox https://gerrit.wikimedia.org/r/134397
Fix deployed to Prod 5/29