System failure when generating any pdf report

Asked by Neville Turner on 2014-12-17

Whenever I attempt to generate something that results in a pdf file output, Schooltool throws up a "System failure while generating Default Manager detail report. Ticket nr. xxxxx" type message. The same fault occurs with any member logged in.

I have tried shortening any "Course Names" that were longer than 20 characters as recommended in this question: https://answers.launchpad.net/schooltool/+question/241490, without success.

I "Started" & "Stopped" the Schooltool service after each try.

Perhaps I should have posted this as a bug report, but I am not very familiar with the process or protocols to be used for bugs vs questions.

E.g.:

 System failure.

Ticket nr. ba75a7cc-7506-48ee-a292-8a2ed447914e.

Please contact your administrator.
Exception

'No blob file'

Traceback

File "/usr/lib/python2.7/dist-packages/schooltool/task/tasks.py", line 184, in runTransaction
  result = callable(*args, **kw)
File "/usr/lib/python2.7/dist-packages/schooltool/report/report.py", line 451, in execute
  report_file = self.renderToFile(renderer, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/schooltool/report/report.py", line 500, in renderToFile
  self.renderReport(renderer, stream, *args, **kw)
File "/usr/lib/python2.7/dist-packages/schooltool/report/report.py", line 540, in renderReport
  rml = renderer.render()
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/page.py", line 56, in render
  return self.template(*args, **kw)
File "/usr/lib/python2.7/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 81, in __call__
  return self.im_func(im_self, *args, **kw)
File "/usr/lib/python2.7/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 49, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
Template "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/rml/pdf.pt"
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/pagetemplate.py", line 241, in __call__
  interpreter()
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 742, in do_insertStructure_tal
  structure = self.engine.evaluateStructure(expr)
File "/usr/lib/python2.7/dist-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/rml/pdf.pt", line 14, column 4
  Expression: <PathExpr standard:u'view/providers/template|nothing'>
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/content.py", line 56, in __call__
  return self.render(*args, **kw)
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/viewlet.py", line 235, in <lambda>
  render = lambda self, *args, **kw: self.template(*args, **kw)
File "/usr/lib/python2.7/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 81, in __call__
  return self.im_func(im_self, *args, **kw)
File "/usr/lib/python2.7/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 49, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
Template "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/rml/pdf_template.pt"
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/pagetemplate.py", line 241, in __call__
  interpreter()
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 821, in do_loop_tal
  self.interpret(block)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/usr/lib/python2.7/dist-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/rml/pdf_template.pt", line 18, column 8
  Expression: <PathExpr standard:u'viewlet'>
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 211, in _eval
  return ob()
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/viewlet.py", line 73, in __call__
  return self.render(*args, **kw)
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/zcml_content.py", line 186, in <lambda>
  setattr(new_class, attr, lambda *a, **kw: method(*a, **kw))
File "/usr/lib/python2.7/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 81, in __call__
  return self.im_func(im_self, *args, **kw)
File "/usr/lib/python2.7/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 49, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations
Template "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/rml/pdf_plain_page_template.pt"
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/pagetemplate.py", line 241, in __call__
  interpreter()
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.7/dist-packages/zope/tal/talinterpreter.py", line 583, in do_setLocal_tal
  self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "/usr/lib/python2.7/dist-packages/zope/tales/tales.py", line 696, in evaluate
  return expression(self)
Template "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/rml/pdf_plain_page_template.pt", line 7, column 2
  Expression: <PathExpr standard:u'view/header'>
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 217, in __call__
  return self._eval(econtext)
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 194, in _eval
  ob = self._subexprs[-1](econtext)
File "/usr/lib/python2.7/dist-packages/zope/tales/expressions.py", line 124, in _eval
  ob = self._traverser(ob, element, econtext)
File "/usr/lib/python2.7/dist-packages/zope/pagetemplate/engine.py", line 66, in __call__
  request=request)
File "/usr/lib/python2.7/dist-packages/zope/traversing/adapters.py", line 136, in traversePathElement
  return traversable.traverse(nm, further_path)
Extra information: (<schooltool.skin.flourish.zcml_content.NoHeaderPlainPageTemplate_default object at 0xae86b9ec>, 'header')
File "/usr/lib/python2.7/dist-packages/zope/traversing/adapters.py", line 42, in traverse
  attr = getattr(subject, name, _marker)
Extra information: (<schooltool.skin.flourish.zcml_content.NoHeaderPlainPageTemplate_default object at 0xae86b9ec>, 'header', [])
File "/usr/lib/python2.7/dist-packages/schooltool/gradebook/browser/pdf_views.py", line 1239, in header
  default = super(NoHeaderPlainPageTemplate, self).header
File "/usr/lib/python2.7/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
  value = func(inst)
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/report.py", line 416, in header
  logo = self.header_school_logo
File "/usr/lib/python2.7/dist-packages/zope/cachedescriptors/property.py", line 71, in __get__
  value = func(inst)
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/report.py", line 365, in header_school_logo
  logo_file = prefs.logo.open()
File "/usr/lib/python2.7/dist-packages/zope/file/file.py", line 52, in open
  return self._data.open(mode)
File "/usr/lib/python2.7/dist-packages/ZODB/Connection.py", line 860, in setstate
  self._setstate(obj)
File "/usr/lib/python2.7/dist-packages/ZODB/Connection.py", line 922, in _setstate
  obj._p_blob_committed = self._storage.loadBlob(obj._p_oid, serial)
File "/usr/lib/python2.7/dist-packages/ZEO/ClientStorage.py", line 1020, in loadBlob
  raise POSException.POSKeyError("No blob file", oid, serial)

Exception

<ExceptionWithTraceback (POSKeyError('No blob file', '\x00\x00\x00\x00\x00\x00\x0b\x9b', '\x03\xa8e5^\xf9\xbc\x11'))>

Traceback

File "/usr/lib/python2.7/dist-packages/schooltool/task/tasks.py", line 211, in __call__
  result = self.runTransaction('execute', True, self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/schooltool/task/tasks.py", line 201, in runTransaction
  raise failure

Here is my system information:

Server Information
Database ['/var/run/schooltool/zeo.sock'] (connected)
Database Size 22.23 MB
Uptime 0 day(s) 00:15:33
System platform Linux P4-VM 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:56:26 UTC 2014 i686 i686
Python version 2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2]
Command line /usr/bin/start-schooltool-instance /etc/schooltool/standard
SchoolTool versions
schooltool 2.8.3
schooltool.cando 2.8.2
schooltool.gradebook 2.8.3.1
schooltool.intervention 2.7.0
schooltool.lyceum.journal 2.8.2.1

SERVER INFORMATION :

Database ['/var/run/schooltool/zeo.sock'] (connected)
Database Size 22.23 MB
Uptime 0 day(s) 00:16:25
System platform Linux P4-VM 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:56:26 UTC 2014 i686 i686
Python version 2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2]
Command line /usr/bin/start-schooltool-instance /etc/schooltool/standard
Preferred encoding UTF-8
File system encoding UTF-8
Process id 13973
Developer mode Off
Python path

    /usr/bin
    /usr/lib/python2.7
    /usr/lib/python2.7/plat-i386-linux-gnu
    /usr/lib/python2.7/lib-tk
    /usr/lib/python2.7/lib-old
    /usr/lib/python2.7/lib-dynload
    /usr/local/lib/python2.7/dist-packages
    /usr/lib/python2.7/dist-packages
    /usr/lib/python2.7/dist-packages/PILcompat
    /usr/lib/python2.7/dist-packages/gtk-2.0
    /usr/lib/pymodules/python2.7
    /usr/lib/python2.7/dist-packages/ubuntu-sso-client

Server
Database generations

Application Minimum Generation Maximum Generation Current Database Generation Evolve?
schooltool.cando 4 4 4 No, up to date
schooltool.requirement 1 1 1 No, up to date
schooltool 44 44 44 No, up to date
schooltool.intervention 9 9 9 No, up to date
schooltool.gradebook 5 5 5 No, up to date
schooltool.lyceum.journal 4 4 4 No, up to date

Title Course ID
English Lit Y7
English Y7
Nursery
Reception 1
Reception 2A
Reception 2B
Y11 English Lit
Y8 English Lit
Y9 English Lit
Year 11 Art
Year 11 Chinese
Year 11 English
Year 11 ESL
Year 11 French
Year 11 Geog
Year 11 History
Year 11 ICT
Year 11 Maths
Year 11 PE
Year 11 Science
Year 1A
Year 1B
Year 2-3 Khmer
Year 2A
Year 2B
Year 3
Year 4
Year 4-5 Khmer
Year 5
Year 6
Year 7 Art & Media
Year 7 Chinese
Year 7 Citizenship
Year 7 DT
Year 7 English
Year 7 ESL
Year 7 French
Year 7 Geog
Year 7 History
Year 7 ICT
Year 7 Maths
Year 7 Music
Year 7 PE
Year 7 Science
Year 8 Art & Media
Year 8 Chinese
Year 8 DT
Year 8 English
Year 8 ESL
Year 8 French
Year 8 Geography
Year 8 History
Year 8 ICT
Year 8 Maths
Year 8 Music
Year 8 PE
Year 8 Science
Year 9 Art & Media
Year 9 Chinese
Year 9 DT
Year 9 English
Year 9 ESL
Year 9 French
Year 9 Geography
Year 9 History
Year 9 ICT
Year 9 Maths
Year 9 Music
Year 9 PE
Year 9 Science

Question information

Language:
English Edit question
Status:
Solved
For:
SchoolTool Edit question
Assignee:
No assignee Edit question
Solved by:
Douglas Cerna
Solved:
2014-12-18
Last query:
2014-12-18
Last reply:
2014-12-17
Best Douglas Cerna (replaceafill) said : #1

Hi. This error is related to the school logo image missing from your database (which is used in the pdf header template). Did you move or restore the database somehow?

You can fix it as manager under the School tab -> Customize sidebar -> School Name option. Either delete the broken image or upload it again. PDF reports should generate after that.

Let us know if this works.

Neville Turner (l-launchpld-s) said : #2

Thanks Douglas Cerna, that solved my question.