Exception deploying a report sheet when no templates exist

Bug #592144 reported by ronny on 2010-06-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool Gradebook
Douglas Cerna

Bug Description

Go to a term, click "Deploy Report Sheet". There are no templates in the dropdown. Click "Deploy", and this error appears:


  KeyError: 'reportWorksheet'


  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 134, 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 109, in mapply
  return debug_call(obj, args)
Extra information: <zope.browserpage.simpleviewclass.SimpleViewClass from /usr/lib/python2.6/dist-packages/schooltool/gradebook/browser/deploy_report_worksheet.pt object at 0xcb92dcc>
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 115, 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 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
Template "/usr/lib/python2.6/dist-packages/schooltool/gradebook/browser/deploy_report_worksheet.pt"
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 271, in __call__
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/gradebook/browser/deploy_report_worksheet.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/gradebook/browser/report_card.py", line 324, in update
File "/usr/lib/python2.6/dist-packages/schooltool/gradebook/browser/report_card.py", line 365, in deploy
File "/usr/lib/python2.6/dist-packages/schooltool/gradebook/browser/report_card.py", line 332, in deployTerm
  worksheet = root.templates[self.request['reportWorksheet']]
File "/usr/lib/python2.6/dist-packages/zope/publisher/base.py", line 334, in __getitem__
  raise KeyError(key)

Tom Hoffman (tom-hoffman) wrote :

If this is the same as the other bug report from yesterday, we should *really* fix this and push the change.

Changed in schooltool:
assignee: nobody → Tom Hoffman (tom-hoffman)
affects: schooltool → schooltool.gradebook
tags: added: traceback
Changed in schooltool.gradebook:
status: New → Confirmed
description: updated
Gediminas Paulauskas (menesis) wrote :

Should say that there are no templates and not allow deploying. Provide a link to "Report sheet templates" management page.

summary: - error with backtrace
+ Exception deploying a report sheet when no templates exist
Changed in schooltool.gradebook:
assignee: Tom Hoffman (tom-hoffman) → Alan Elkner (aelkner)
importance: Undecided → High
milestone: none → 0.7.1
Changed in schooltool.gradebook:
importance: High → Medium
milestone: 0.7.1 → 0.7.2
Changed in schooltool.gradebook:
milestone: 0.7.2 → 0.7.3
Changed in schooltool.gradebook:
assignee: Alan Elkner (aelkner) → Douglas Cerna (replaceafill)
status: Confirmed → In Progress
Changed in schooltool.gradebook:
status: In Progress → Fix Committed
Changed in schooltool.gradebook:
milestone: 0.7.3 → 0.7.2
Changed in schooltool.gradebook:
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