Beginners issue with nested dos
Hi! I'm trying out appy.pod as a report generator. I try to set up a really minimal example with a ods template using conditional columns, which causes an exception in appy. Have I just got things very wrong or does this simple use case trigger a bug?
Code is below. appytest.ods is at http://
#######
from appy.pod.renderer import Renderer
staff = [{'firstName': 'Delannay', 'name': 'Gaetan', 'age': 112},
renderer = Renderer(
renderer.run()
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Appy Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2014-06-23
- Last reply:
- 2014-06-23
David Björkevik (o-david-r) said : | #1 |
Forgot to add the traceback I get from running this:
Traceback (most recent call last):
File "play_with_
renderer.run()
File "/home/
self.
File "/home/
self.
File "/usr/lib64/
xmlreader.
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/home/
isMainElement = e.currentBuffer
File "/home/
if hasattr(mainElem, 'OD'): mainElem = mainElem.OD.elem
AttributeError: 'NoneType' object has no attribute 'elem'
The template file is made using LibreOffice 4.1.6.2. For the above test i use the bzr trunk head, but it crashes in a similar way with latest stable release.
Hi David,
The conditional inclusion of columns is a tricky thing and does not work yet. If you remove your 2 "do cell" statements, it should work.
Cheers,
Gaetan
Can you help with this problem?
Provide an answer of your own, or ask David Björkevik for more information if necessary.