Relatorio

Bug 31

classification
Title: traceback when running examples
Type: crash Severity:
Components: core Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: ced Nosy List: ced, fabix
Priority: Keywords:

Created on 2017-07-13 12:10 by fabix, last changed 2017-07-13 12:18 by ced.

Messages
msg32 Author: [hidden] (fabix) Date: 2017-07-13 12:10
Package used: relatorio-0.6.4-py2-none-any.whl
Python version: 2.7.9

$ python examples/demo_odf.py 
/home/fabien/dev/python/relatorio/local/lib/python2.7/site-packages/relatorio/templates/__init__.py:29:
UserWarning: Unable to load plugin 'chart'
  warnings.warn("Unable to load plugin '%s'" % name)
generating output_basic.odt...  done
generating output_template_basic.odt...  done
generating output_complicated.odt... 
Traceback (most recent call last):
  File "examples/demo_odf.py", line 34, in <module>
    content = report(o=inv).render().getvalue()
  File
"/home/fabien/dev/python/relatorio/local/lib/python2.7/site-packages/relatorio/templates/base.py",
line 34, in render
    return self.serializer(self.events)
  File
"/home/fabien/dev/python/relatorio/local/lib/python2.7/site-packages/relatorio/templates/opendocument.py",
line 894, in __call__
    for kind, data, pos in stream:
  File
"/usr/lib/python2.7/dist-packages/genshi/template/base.py",
line 618, in _include
    for event in stream:
  File
"/usr/lib/python2.7/dist-packages/genshi/template/markup.py", line
326, in _match
    for event in stream:
  File
"/usr/lib/python2.7/dist-packages/genshi/template/base.py",
line 558, in _flatten
    for kind, data, pos in stream:
  File
"/usr/lib/python2.7/dist-packages/genshi/template/directives.py",
line 169, in _generate
    attrs = _eval_expr(self.expr, ctxt, vars)
  File
"/usr/lib/python2.7/dist-packages/genshi/template/base.py",
line 289, in _eval_expr
    retval = expr.evaluate(ctxt)
  File
"/usr/lib/python2.7/dist-packages/genshi/template/eval.py",
line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "<string>", line 1, in <Expression
u'__relatorio_make_href(__relatorio_get_cache(3062795916))'>
  File
"/home/fabien/dev/python/relatorio/local/lib/python2.7/site-packages/relatorio/templates/opendocument.py",
line 134, in __call__
    bitstream = bitstream(**self.context).render()
  File
"/home/fabien/dev/python/relatorio/local/lib/python2.7/site-packages/relatorio/reporting.py",
line 121, in __call__
    template = self.tmpl_loader.load(self.fpath, self.mimetype)
  File
"/home/fabien/dev/python/relatorio/local/lib/python2.7/site-packages/relatorio/reporting.py",
line 78, in load
    cls = self.factories[self.get_type(mime)]
KeyError: None
msg33 Author: [hidden] (ced) Date: 2017-07-13 12:18
This is because the example use the chart templating and you
did not install the extra chart dependencies.
History
Date User Action Args
2017-07-13 12:18:37cedsetstatus: new -> closed
assignee: ced
resolution: wont fix
messages: + msg33
nosy: + ced
2017-07-13 12:10:46fabixcreate