# Problem with printing report

**URL:** <https://discuss.tryton.org/t/problem-with-printing-report/5878>\
**Category:** Developer\
**Created:** [January 31, 2023, 6:09pm UTC](https://discuss.tryton.org/t/problem-with-printing-report/5878 "2023-01-31T18:09:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niddorcahm](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/niddorcahm/32/1376_2.png) [@Niddorcahm](https://discuss.tryton.org/u/Niddorcahm)\
**Post date:** [January 31, 2023, 6:09pm UTC](https://discuss.tryton.org/t/problem-with-printing-report/5878/1 "2023-01-31T18:09:30Z")

</div>

Hello,

I want to print a report but this error pop up.

```auto
Traceback (most recent call last):
  File "/trytond/wsgi.py", line 117, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 47, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 84, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 159, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 180, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/report/report.py", line 216, in execute
    groups[0], headers[0], data, action_report)
  File "/trytond/report/report.py", line 233, in _execute
    return cls.convert(action, cls.render(action, report_context))
  File "/trytond/report/report.py", line 329, in render
    data = template.generate(**report_context).render()
  File "/relatorio/templates/base.py", line 35, in render
    self.events, method=method, encoding=encoding, out=out)
  File "/relatorio/templates/opendocument.py", line 1179, in __call__
    self.xml_serializer(writer(stream)), encoding=encoding, out=writer)
  File "/site-packages/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/site-packages/genshi/output.py", line 241, in __call__
    for kind, data, pos in stream:
  File "/site-packages/genshi/output.py", line 669, in __call__
    for kind, data, pos in stream:
  File "/site-packages/genshi/output.py", line 774, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/site-packages/genshi/output.py", line 594, in __call__
    for ev in stream:
  File "/relatorio/templates/opendocument.py", line 1071, in __call__
    for kind, data, pos in stream:
  File "/site-packages/genshi/filters/i18n.py", line 690, in __call__
    for kind, data, pos in stream:
  File "/site-packages/genshi/template/base.py", line 617, in _include
    for event in stream:
  File "/site-packages/genshi/template/markup.py", line 326, in _match
    for event in stream:
  File "/site-packages/genshi/template/base.py", line 557, in _flatten
    for kind, data, pos in stream:
  File "/site-packages/genshi/template/directives.py", line 367, in __call__
    iterable = _eval_expr(self.expr, ctxt, vars)
  File "/site-packages/genshi/template/base.py", line 289, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/site-packages/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {' __data__': data})
  File "<string>", line 733, in <Expression 'iter(objects)'>
  File "/site-packages/genshi/template/eval.py", line 311, in lookup_name
    val = cls.undefined(name)
  File "/site-packages/genshi/template/eval.py", line 414, in undefined
    raise UndefinedError(key, owner=owner)
genshi.template.eval.UndefinedError: "objects" not defined

Fault: "objects" not defined

```

Help please 🥲

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [January 31, 2023, 8:56pm UTC](https://discuss.tryton.org/t/problem-with-printing-report/5878/2 "2023-01-31T20:56:20Z")

</div>

Tryton does not use `objects` since [Report API refactorization (cd0f2a2c1c88) · Commits · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/commit/cd0f2a2c1c88)  
The default value in the context is `records`.

---

<div class="post-metadata">

**Author:** ![Niddorcahm](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/niddorcahm/32/1376_2.png) [@Niddorcahm](https://discuss.tryton.org/u/Niddorcahm)\
**Post date:** [February 1, 2023, 1:08am UTC](https://discuss.tryton.org/t/problem-with-printing-report/5878/3 "2023-02-01T01:08:01Z")

</div>

You have all the reason. Thank you very much.  
But I can’t find where this line originates:  
**File “”, line 733, in \<Expression ‘iter(objects)’\>**
