School Tool Crashes trying to add or edit sections

Bug #975687 reported by Rena Willis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool Gradebook
Fix Released
Critical
Gediminas Paulauskas

Bug Description

This bug occurs in a clean install of Zentyal 2.3 running on UBUNTU 10.04 and SchoolTool 2.0. It occurs anytime you try to add a section or edit an automatically created section.

Any help would be greatly appreciated.

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

TypeError: There isn't enough context to get URL information. This is probably due to a bug in setting up location information.

Traceback

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 205, 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: <schooltool.skin.flourish.zcml_content.FlourishSectionView_index.html object at 0x93f5390>
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/schooltool/skin/flourish/page.py", line 81, in __call__
  result = self.render(*args, **kw)
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 158, in render
  return self.template()
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 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
Template "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/templates/main.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 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(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 742, in do_insertStructure_tal
  structure = self.engine.evaluateStructure(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/skin/flourish/templates/main.pt", line 79, column 8
  Expression: <PathExpr standard:u'view/page_template|nothing'>
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/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 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
Template "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/templates/page.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 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(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/skin/flourish/templates/page.pt", line 3, column 0
  Expression: <PathExpr standard:u'view/providers/page_refine|nothing'>
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/skin/flourish/content.py", line 59, in __call__
  return self.render(*args, **kw)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 140, in render
  result = ViewletManager.render(self, *args, **kw)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/viewlet.py", line 239, in <lambda>
  render = lambda self, *args, **kw: self.template(*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/schooltool/common/inlinept.py", line 111, in __call__
  showtal=getattr(instance.request.debug, 'showTAL', False),
File "/usr/lib/python2.6/dist-packages/zope/pagetemplate/pagetemplate.py", line 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
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 821, in do_loop_tal
  self.interpret(block)
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 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(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 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/usr/lib/python2.6/dist-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "None", line 3, column 10
  Expression: <PathExpr standard:'viewlet'>
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/skin/flourish/viewlet.py", line 253, in __call__
  return ViewletManager.__call__(self, *args, **kw)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/content.py", line 59, in __call__
  return self.render(*args, **kw)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 341, in render
  if not self.items:
File "/usr/lib/python2.6/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
  value = func(inst)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 252, in items
  result = [item for item in self.all_items
File "/usr/lib/python2.6/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
  value = func(inst)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 246, in all_items
  'content': viewlet(),
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/viewlet.py", line 77, in __call__
  return self.render(*args, **kw)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 416, in render
  return self.template(*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/schooltool/common/inlinept.py", line 111, in __call__
  showtal=getattr(instance.request.debug, 'showTAL', False),
File "/usr/lib/python2.6/dist-packages/zope/pagetemplate/pagetemplate.py", line 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
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 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/usr/lib/python2.6/dist-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "None", line 2, column 4
  Expression: <PathExpr standard:'view/url'>
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 194, in _eval
  ob = self._subexprs[-1](econtext)
File "/usr/lib/python2.6/dist-packages/zope/tales/expressions.py", line 124, in _eval
  ob = self._traverser(ob, element, econtext)
File "/usr/lib/python2.6/dist-packages/zope/pagetemplate/engine.py", line 68, in __call__
  request=request)
File "/usr/lib/python2.6/dist-packages/zope/traversing/adapters.py", line 138, in traversePathElement
  return traversable.traverse(nm, further_path)
Extra information: (<schooltool.skin.flourish.zcml_content.SectionGradebookLinkViewlet_gradebook object at 0xa2365d0>, 'url')
File "/usr/lib/python2.6/dist-packages/zope/traversing/adapters.py", line 44, in traverse
  attr = getattr(subject, name, _marker)
Extra information: (<schooltool.skin.flourish.zcml_content.SectionGradebookLinkViewlet_gradebook object at 0xa2365d0>, 'url', [])
File "/usr/lib/python2.6/dist-packages/schooltool/gradebook/browser/gradebook.py", line 1922, in url
  return absoluteURL(self.gradebook, self.request)
File "/usr/lib/python2.6/dist-packages/zope/traversing/browser/absoluteurl.py", line 35, in absoluteURL
  return zope.component.getMultiAdapter((ob, request), IAbsoluteURL)()
File "/usr/lib/python2.6/dist-packages/zope/traversing/browser/absoluteurl.py", line 71, in __call__
  return self.__str__()
File "/usr/lib/python2.6/dist-packages/zope/traversing/browser/absoluteurl.py", line 57, in __str__
  raise TypeError(_insufficientContext)

affects: schooltool → schooltool.gradebook
Changed in schooltool.gradebook:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Douglas Cerna (replaceafill) wrote :

This is caused by zope.traversing 3.12 in 10.04. I was able to reproduce this in trunk pinning down the version.

zope.traversing 3.12 always uses the ILocation adapter, even if the object provides its own __parent__. This was changed in 3.13 (http://svn.zope.org/*checkout*/zope.traversing/tags/3.13/CHANGES.txt?rev=114364)

Revision history for this message
Douglas Cerna (replaceafill) wrote :

A (dirty) workaround is to install zope.traversing 3.13 from maverick:

$ wget http://ppa.launchpad.net/schooltool-owners/ubuntu/pool/main/z/zope.traversing/python-zope.traversing_3.13.2-0ubuntu1~maverick1_all.deb
$ sudo dpkg -i python-zope.traversing_3.13.2-0ubuntu1~maverick1_all.deb
$ sudo service schooltool restart

Revision history for this message
Rena Willis (rwillis) wrote :

Problem resolved with (dirty) workaround (which is much cleaner than the "Virtual Machine" workaround we were playing with.) Works beautifully. Hats Off from Lakeside International School in Costa Rica!

Thank you!

Changed in schooltool.gradebook:
assignee: nobody → Gediminas Paulauskas (menesis)
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

I have copied the mentioned zope.traversing package to the Lucid PPA.

Changed in schooltool.gradebook:
status: Confirmed → Fix Released
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.