Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

QWebException: need more than 1 value to unpack

By
sameer alhwety
on 1/12/15, 7:29 AM 2,927 views

Hello ,

I have an exception happend when click on print report menu .

this happend many times on many report , What is the issue in my reports to get exception like this ?

 

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/service/server.py", line 280, in app
    return self.app(e, s)
  File "/home/sameer/workspace/odoo/src/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 1214, in __call__
    return self.dispatch(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 1188, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 1188, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 1188, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 1355, in dispatch
    result = ir_http._dispatch()
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_http.py", line 130, in _dispatch
    return self._handle_exception(e)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_http.py", line 100, in _handle_exception
    return request._handle_exception(exception)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 595, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_http.py", line 126, in _dispatch
    result = request.dispatch()
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 613, in dispatch
    r = self._call_function(**self.params)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 282, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/sameer/workspace/odoo/src/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 279, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 732, in __call__
    return self.method(*args, **kw)
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 375, in response_wrap
    response = f(*args, **kw)
  File "/home/sameer/.local/share/Odoo/addons/8.0/report/controllers/main.py", line 117, in report_download
    response = self.report_routes(reportname, docids=docids, converter='pdf')
  File "/home/sameer/workspace/odoo/src/openerp/http.py", line 375, in response_wrap
    response = f(*args, **kw)
  File "/home/sameer/.local/share/Odoo/addons/8.0/report/controllers/main.py", line 64, in report_routes
    pdf = report_obj.get_pdf(cr, uid, docids, reportname, data=options_data, context=context)
  File "/home/sameer/workspace/odoo/src/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/sameer/.local/share/Odoo/addons/8.0/report/models/report.py", line 168, in get_pdf
    html = self.get_html(cr, uid, ids, report_name, data=data, context=context)
  File "/home/sameer/workspace/odoo/src/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/sameer/.local/share/Odoo/addons/8.0/report/models/report.py", line 143, in get_html
    return particularreport_obj.render_html(cr, uid, ids, data=data, context=context)
  File "/home/sameer/workspace/odoo/src/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/sameer/.local/share/Odoo/addons/8.0/report/models/abstract_report.py", line 64, in render_html
    return self.pool['report'].render(cr, uid, [], self._template, docargs, context=context)
  File "/home/sameer/workspace/odoo/src/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/sameer/.local/share/Odoo/addons/8.0/report/models/report.py", line 129, in render
    return view_obj.render(cr, uid, template, values, context=context)
  File "/home/sameer/workspace/odoo/src/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_ui_view.py", line 1007, in render
    return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
  File "/home/sameer/workspace/odoo/src/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 247, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 284, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 282, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 403, in render_tag_call
    d[0] = self.render_element(element, template_attributes, generated_attributes, d)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 284, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 282, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 393, in render_tag_foreach
    ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 284, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 284, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 282, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 393, in render_tag_foreach
    ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 284, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 310, in render_element
    raise_qweb_exception(message="Could not render element %r" % element.tag, node=element, template=template)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 305, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 282, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/sameer/.local/share/Odoo/addons/8.0/base/ir/ir_qweb.py", line 447, in render_tag_field
    record, field_name = template_attributes["field"].rsplit('.', 1)
QWebException: need more than 1 value to unpack

Thanks

Please post back the errors from the logfile or your terminal ;) We can't see what is wrong now..

Yenthe
on 1/12/15, 7:32 AM

Could you also add your report code please? Is this a custom report or a default one?

Yenthe
on 1/12/15, 7:55 AM
1

tolstoj

--tolstoj--
899
| 6 5 8
Germany
--tolstoj--

hi

tolstoj
On 2/26/15, 10:28 AM

What's because some of your t-field directives dont have “smart” record as a parameter (variable with dot).

As a result you getting error in rsplit in base/ir/ir_qweb.py:447.

For "normal" var's you must use t-raw or t-esc directives.

From documantation:

The t-field directive can only be used when performing field access (a.b) on a “smart” record (result of the browse method). It is able to automatically format based on field type, and is integrated in the website’s rich text edition.

Hope this helps.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 1/12/15, 7:29 AM
Seen: 2927 times
Last updated: 3/16/15, 8:10 AM