Error when section is not scheduled for current term

Bug #976712 reported by Rena Willis on 2012-04-08
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SchoolTool Journal
Critical
Gediminas Paulauskas

Bug Description

The following error occurs when trying to view the Journal from the Sections Screen:

Installed on Zentyal 2.3 running on Ubuntu 10.04 Schooltool 2.0

Steps to recreate:
View a newly created section (viewing one term)
Add a Schedule
Click Journal (everything is fine)
View a different term (without leaving the section)
Click Journal (without defining a schedule)

Recieve the following error (if you add a schedule to the term, the error is not generated when trying to view the journal):

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: argument of type 'NoneType' is not iterable

 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.FlourishLyceumSectionJournalView_index.html object at 0x90ee090>
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/schooltool/skin/flourish/page.py", line 74, 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/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 76, column 8
  Expression: <PathExpr standard:u'view/providers/tertiary_navigation|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/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 819, in do_loop_tal
  iterator = self.engine.setRepeat(name, expr)
File "/usr/lib/python2.6/dist-packages/zope/tales/tales.py", line 682, in setRepeat
  expr = self.evaluate(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:'view/items'>
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 136, in traversePathElement
  return traversable.traverse(nm, further_path)
Extra information: (<schooltool.skin.flourish.zcml_content.JournalTertiaryNavigationManager_tertiary_navigation object at 0x9fef5d0>, 'items')
File "/usr/lib/python2.6/dist-packages/zope/traversing/adapters.py", line 42, in traverse
  attr = getattr(subject, name, _marker)
Extra information: (<schooltool.skin.flourish.zcml_content.JournalTertiaryNavigationManager_tertiary_navigation object at 0x9fef5d0>, '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/lyceum/journal/browser/journal.py", line 939, in items
  for month_id in self.view.selected_months:
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/lyceum/journal/browser/journal.py", line 558, in selected_months
  return list(self.monthsInSelectedTerm())
File "/usr/lib/python2.6/dist-packages/schooltool/lyceum/journal/browser/journal.py", line 549, in monthsInSelectedTerm
  for meeting in self.all_meetings:
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/lyceum/journal/browser/journal.py", line 453, in all_meetings
  return self.allMeetings()
File "/usr/lib/python2.6/dist-packages/schooltool/lyceum/journal/browser/journal.py", line 447, in allMeetings
  insecure_events)
File "/usr/lib/python2.6/dist-packages/schooltool/lyceum/journal/browser/journal.py", line 446, in <lambda>
  insecure_events[:] = filter(lambda e: e.dtstart.date() in term,

Changed in schooltool:
milestone: none → 2.1.0
status: New → Triaged
importance: Undecided → Critical
Changed in schooltool:
assignee: nobody → Justas Sadzevičius (justas-pov)
affects: schooltool → schooltool.lyceum.journal
Changed in schooltool.lyceum.journal:
milestone: 2.1.0 → none
milestone: none → 2.1.0
summary: - Error When trying to view Journal
+ Error when section is not scheduled for current term
Changed in schooltool.lyceum.journal:
status: Triaged → Fix Committed
assignee: Justas Sadzevičius (justas-pov) → Gediminas Paulauskas (menesis)
Changed in schooltool.lyceum.journal:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers