Relatorio

Message97

Author uha4
Recipients
Date 2019-04-13.19:43:34
Message-id <1555177414.95.0.962314539873.bug51@tryton.org>
In-reply-to
when playing with reports in tryton, an error was raised out
of relatorio:

"""
File
"/usr/lib/python3/dist-packages/relatorio/templates/opendocument.py",
line 294, in _parse
  content = template._parse(self.insert_directives(content),
encoding)
File
"/usr/lib/python3/dist-packages/relatorio/templates/opendocument.py",
line 347, in insert_directives
  self._handle_relatorio_tags(tree)
File
"/usr/lib/python3/dist-packages/relatorio/templates/opendocument.py",
line 460, in _handle_relatorio_tags
  r_statements, closing_tags = self._relatorio_statements(tree)
File
"/usr/lib/python3/dist-packages/relatorio/templates/opendocument.py",
line 416, in _relatorio_statements
  % opened_tags[-1].text

builtins.AttributeError: 'tuple' object has no attribute 'text'
"""

so i looked with the debugger and in the source: opened_tags
is a list of tuples. So i guess this line 416 has to be "  %
opened_tags[-1][].text" accessing the .text element of the
firt component of the tuple.
If i change it like that, there is no more Error, but the
warning is printed this line is supposed to generate.
History
Date User Action Args
2019-04-13 19:43:34uha4setmessageid: <1555177414.95.0.962314539873.bug51@tryton.org>
2019-04-13 19:43:34uha4linkbug51 messages
2019-04-13 19:43:34uha4create