Crash trying to book a resource with unicode characters

Bug #916086 reported by Gediminas Paulauskas on 2012-01-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
High
Douglas Cerna

Bug Description

I have created a Resource named "Kėdė" and then clicked Book in the sidebar. Got an exception that's hard to comprehend

Exception
KeyError: u'\u0117'

Traceback
File "/home/menesis/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py", line 132, in publish
  result = publication.callObject(request, obj)
File "/home/menesis/.buildout/eggs/zope.app.publication-3.13.2-py2.7.egg/zope/app/publication/zopepublication.py", line 207, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/home/menesis/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py", line 107, in mapply
  return debug_call(obj, args)
Extra information: <schooltool.skin.flourish.zcml_content.FlourishCalendarEventEditView_edit.html object at 0xe0c8c4c>
File "/home/menesis/.buildout/eggs/zope.publisher-3.12.6-py2.7.egg/zope/publisher/publish.py", line 113, in debug_call
  return obj(*args)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 71, in __call__
  result = self.render(*args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 64, in render
  return self.template(*args, **kw)
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 51, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
Template "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/templates/main.pt"
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 240, in __call__
  interpreter()
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 742, in do_insertStructure_tal
  structure = self.engine.evaluateStructure(expr)
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/templates/main.pt", line 72, column 8
  Expression: <PathExpr standard:u'view/page_template|nothing'>
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 51, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
Template "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/templates/page.pt"
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 240, in __call__
  interpreter()
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/templates/page.pt", line 3, column 0
  Expression: <PathExpr standard:u'view/providers/page_refine|nothing'>
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/content.py", line 59, in __call__
  return self.render(*args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 100, in render
  result = ViewletManager.render(self, *args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/viewlet.py", line 140, in <lambda>
  render = lambda self, *args, **kw: self.template(*args, **kw)
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/common/inlinept.py", line 111, in __call__
  showtal=getattr(instance.request.debug, 'showTAL', False),
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 240, in __call__
  interpreter()
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 821, in do_loop_tal
  self.interpret(block)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "None", line 3, column 10
  Expression: <PathExpr standard:'viewlet'>
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/viewlet.py", line 245, in __call__
  return ViewletManager.__call__(self, *args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/content.py", line 59, in __call__
  return self.render(*args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 293, in render
  if not self.items:
File "/home/menesis/.buildout/eggs/zope.cachedescriptors-3.5.1-py2.7.egg/zope/cachedescriptors/property.py", line 71, in __get__
  value = func(inst)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 212, in items
  result = [item for item in self.all_items
File "/home/menesis/.buildout/eggs/zope.cachedescriptors-3.5.1-py2.7.egg/zope/cachedescriptors/property.py", line 71, in __get__
  value = func(inst)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 206, in all_items
  'content': viewlet(),
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/viewlet.py", line 77, in __call__
  return self.render(*args, **kw)
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/page.py", line 368, in render
  return self.template(*args, **kw)
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/home/menesis/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/viewpagetemplatefile.py", line 51, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
Template "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/templates/modal_form_link.pt"
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 240, in __call__
  interpreter()
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/home/menesis/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/skin/flourish/templates/modal_form_link.pt", line 3, column 0
  Expression: <PathExpr standard:u'view/url'>
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 194, in _eval
  ob = self._subexprs[-1](econtext)
File "/home/menesis/.buildout/eggs/zope.tales-3.5.1-py2.7.egg/zope/tales/expressions.py", line 124, in _eval
  ob = self._traverser(ob, element, econtext)
File "/home/menesis/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/engine.py", line 66, in __call__
  request=request)
File "/home/menesis/.buildout/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 136, in traversePathElement
  return traversable.traverse(nm, further_path)
Extra information: (<schooltool.skin.flourish.zcml_content.DeleteEventLinkViewlet_delete.html object at 0xe0d1eac>, 'url')
File "/home/menesis/.buildout/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 42, in traverse
  attr = getattr(subject, name, _marker)
Extra information: (<schooltool.skin.flourish.zcml_content.DeleteEventLinkViewlet_delete.html object at 0xe0d1eac>, 'url', [])
File "/home/menesis/src/schooltool/flourish/src/schooltool/src/schooltool/calendar/browser/event.py", line 336, in url
  urllib.quote(self.nextURL()))
File "/usr/lib/python2.7/urllib.py", line 1265, in quote
  return ''.join(map(quoter, s))

URL that showed this exception was

http://127.0.0.1:7081/persons/manager/calendar/MjAxMjAxMTMxNTQ5MTIuNTM4MC40MjIwNC4zOTU4ODQuNzEyNzczNEBvcmUubWVuZXNpcy5sdA%3D%3D/edit.html?back_url=http://127.0.0.1:7081/resources/k%C4%97d%C4%97&cancel_url=http%3A//127.0.0.1%3A7081/persons/manager/calendar/delete-temp.html%3Fevent_id%3D20120113154912.5380.42204.395884.7127734%40ore.menesis.lt%26date%3D2012-01-13%26back_url%3Dhttp%3A//127.0.0.1%3A7081/resources/k%25C4%2597d%25C4%2597%26DELETE%3DDelete

can't believe it needs to be that long, and have two back_url's...

Changed in schooltool:
assignee: nobody → Douglas Cerna (replaceafill)
importance: Undecided → High
status: New → Triaged
Changed in schooltool:
status: Triaged → Fix Committed
milestone: none → 2.1.0
Changed in schooltool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers