Error viewing Timetable Schemas when no default is selected

Bug #545780 reported by wos on 2010-03-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Undecided
Gediminas Paulauskas

Bug Description

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

  KeyError:
Traceback

  File "/usr/lib/python2.5/site-packages/zope/publisher/publish.py", line 133, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.5/site-packages/zope/app/publication/zopepublication.py", line 167, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.5/site-packages/zope/publisher/publish.py", line 108, in mapply
  return debug_call(obj, args)
Extra information: <zope.app.pagetemplate.simpleviewclass.SimpleViewClass from /usr/lib/python2.5/site-packages/schooltool/timetable/browser/templates/timetable-schema-container.pt object at 0xc323b2c>
File "/usr/lib/python2.5/site-packages/zope/publisher/publish.py", line 114, in debug_call
  return obj(*args)
File "/usr/lib/python2.5/site-packages/zope/app/pagetemplate/simpleviewclass.py", line 44, in __call__
  return self.index(*args, **kw)
File "/usr/lib/python2.5/site-packages/zope/app/pagetemplate/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/usr/lib/python2.5/site-packages/zope/app/pagetemplate/viewpagetemplatefile.py", line 51, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.5/site-packages/zope/pagetemplate/pagetemplate.py", line 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
Template "/usr/lib/python2.5/site-packages/schooltool/timetable/browser/templates/timetable-schema-container.pt"
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 891, in do_useMacro
  self.interpret(macro)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 536, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 521, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 516, in no_tag
  self.interpret(program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 957, in do_defineSlot
  self.interpret(block)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 536, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 521, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 516, in no_tag
  self.interpret(program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 949, in do_defineSlot
  self.interpret(slot)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 536, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 521, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 516, in no_tag
  self.interpret(program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 855, in do_condition
  self.interpret(block)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 536, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 521, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 516, in no_tag
  self.interpret(program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 855, in do_condition
  self.interpret(block)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 536, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 521, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 516, in no_tag
  self.interpret(program)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 346, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.5/site-packages/zope/tal/talinterpreter.py", line 586, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/usr/lib/python2.5/site-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/usr/lib/python2.5/site-packages/schooltool/timetable/browser/templates/timetable-schema-container.pt", line 42, column 8
  Expression: <PathExpr standard:u'context/getDefault'>
File "/usr/lib/python2.5/site-packages/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/usr/lib/python2.5/site-packages/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/usr/lib/python2.5/site-packages/schooltool/timetable/schema.py", line 185, in getDefault
  return self[self.default_id]
File "/usr/lib/python2.5/site-packages/zope/app/container/btree.py", line 86, in __getitem__
  return self._SampleContainer__data[key]

Tom Hoffman (tom-hoffman) wrote :

What led to this?

tags: added: timetables traceback
Gediminas Paulauskas (menesis) wrote :

This happens if default timetable schema is not selected, and a teacher or student clicks on Timetable Schemas link.

Changed in schooltool:
status: New → Fix Committed
assignee: nobody → Gediminas Paulauskas (menesis)
milestone: none → 1.4.0
summary: - Server Error (unknown reason)
+ Error viewing Timetable Schemas when no default is selected
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