UnicodeError:"label empty or too long"

Bug #1032863 reported by richardjhdonaldson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SchoolTool
Triaged
High
Douglas Cerna

Bug Description

Adding a new person:
     <School><People (under my school year)><Teacher (under the Add, without clicking on 'Done')>

The error shows up, I realize that I should have clicked on 'Done' first, but then it still should not give the error list that follows:
-----------------
Server Error
An internal server error has occurred. This most likely means that you have found a bug in SchoolTool. Please report it on the issue tracker.

Exception
UnicodeError: label empty or too long

Traceback
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 132, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 207, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 107, in mapply
  return debug_call(obj, args)
Extra information: <schooltool.skin.flourish.zcml_content.FlourishPersonAddView_addTeacher.html object at 0x7fb2e8a20590>
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 113, in debug_call
  return obj(*args)
File "/usr/lib/python2.7/dist-packages/z3c/form/form.py", line 215, in __call__
  self.update()
File "/usr/lib/python2.7/dist-packages/schooltool/basicperson/browser/person.py", line 929, in update
  self.buildFieldsetGroups()
File "/usr/lib/python2.7/dist-packages/schooltool/basicperson/browser/person.py", line 952, in buildFieldsetGroups
  _('Demographics'), list(self.getDemoFields())),
File "/usr/lib/python2.7/dist-packages/schooltool/basicperson/browser/person.py", line 865, in getDemoFields
  fields += field_desc.makeField()
File "/usr/lib/python2.7/dist-packages/schooltool/basicperson/demographics.py", line 216, in makeField
  vocabulary=IDNAVocabulary.fromValues(self.items)
File "/usr/lib/python2.7/dist-packages/zope/schema/vocabulary.py", line 99, in fromValues
  terms = [cls.createTerm(value) for value in values]
File "/usr/lib/python2.7/dist-packages/schooltool/basicperson/demographics.py", line 202, in createTerm
  token = value.encode('idna')
File "/usr/lib/python2.7/encodings/idna.py", line 164, in encode
  result.append(ToASCII(label))
File "/usr/lib/python2.7/encodings/idna.py", line 73, in ToASCII
  raise UnicodeError("label empty or too long")

Changed in cando:
assignee: nobody → Alan Elkner (aelkner)
importance: Undecided → High
Changed in cando:
assignee: Alan Elkner (aelkner) → Douglas Cerna (replaceafill)
status: New → Triaged
affects: cando → schooltool
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.