UnicodeEncodeError in search field of interventions

Bug #738351 reported by Asupperi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SchoolTool Intervention
Fix Released
Medium
Gediminas Paulauskas

Bug Description

When searching persons with tilde character like á, ó etc, the following error is returned:
Excepción

  UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 119: ordinal not in range(128)
Traza

  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 132, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.6/dist-packages/zope/app/publication/zopepublication.py", line 207, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 107, in mapply
  return debug_call(obj, args)
Extra information: <zope.browserpage.simpleviewclass.SimpleViewClass from /usr/lib/python2.6/dist-packages/schooltool/intervention/browser/intervention_startup.pt object at 0xa435e10>
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 113, in debug_call
  return obj(*args)
File "/usr/lib/python2.6/dist-packages/zope/browserpage/simpleviewclass.py", line 44, in __call__
  return self.index(*args, **kw)
File "/usr/lib/python2.6/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/usr/lib/python2.6/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 51, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.6/dist-packages/zope/pagetemplate/pagetemplate.py", line 113, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
Template "/usr/lib/python2.6/dist-packages/schooltool/intervention/browser/intervention_startup.pt"
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 851, in do_condition
  if not self.tal or self.engine.evaluateBoolean(condition):
File "/usr/lib/python2.6/dist-packages/zope/tales/tales.py", line 701, in evaluateBoolean
  return not not self.evaluate(expr)
File "/usr/lib/python2.6/dist-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/usr/lib/python2.6/dist-packages/schooltool/intervention/browser/intervention_startup.pt", line 1, column 0
  Expression: <PathExpr standard:u'view/update'>
File "/usr/lib/python2.6/dist-packages/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/usr/lib/python2.6/dist-packages/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/usr/lib/python2.6/dist-packages/schooltool/intervention/browser/intervention.py", line 293, in update
  self.request.response.redirect(url)
File "/usr/lib/python2.6/dist-packages/zope/publisher/browser.py", line 743, in redirect
  if base and isRelative(str(location)):

Revision history for this message
Asupperi (arskacr) wrote :

I think that this error also affects on gradebooks ability to order alphabetically, por instance:
Gómez is after Gutiérrez.

affects: schooltool → schooltool.intervention
Changed in schooltool.intervention:
assignee: nobody → Alan Elkner (aelkner)
Revision history for this message
Douglas Cerna (replaceafill) wrote :

Probably the error is that the update method of the schooltool.intervention.browser.intervention.InterventionStartupView class is concatenating the SEARCH_STUDENT_NAME without encoding it first.

Sorting in the gradebook was fixed recently.

Changed in schooltool.intervention:
assignee: Alan Elkner (aelkner) → Gediminas Paulauskas (menesis)
importance: Undecided → Medium
milestone: none → 0.4.3
status: New → Fix Committed
Changed in schooltool.intervention:
milestone: 0.4.3 → 0.5.0
status: Fix Committed → Fix Released
Changed in schooltool.intervention:
milestone: 0.5.0 → 0.4.3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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