value error when opening form view of a product

Bug #610256 reported by Vianney - www.akretion.com.br
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Incomplete
Undecided
Unassigned
Nominated for Trunk by ub121

Bug Description

In the revision n° 2544 when opening a product in form view, it raises a value error :

ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/opt/openerp-trunk/server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp-trunk/server/bin/osv/osv.py", line 133, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp-trunk/server/bin/osv/osv.py", line 123, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp-trunk/addons/magentoerpconnect/product.py", line 759, in fields_view_get
    result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar)
  File "/opt/openerp-trunk/server/bin/osv/orm.py", line 1635, in fields_view_get
    xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=context)
  File "/opt/openerp-trunk/server/bin/osv/orm.py", line 1297, in __view_look_dom_arch
    fields_def = self.__view_look_dom(cr, user, node, view_id, context=context)
  File "/opt/openerp-trunk/server/bin/osv/orm.py", line 1292, in __view_look_dom
    fields.update(self.__view_look_dom(cr, user, f, view_id, context))
  File "/opt/openerp-trunk/server/bin/osv/orm.py", line 1292, in __view_look_dom
    fields.update(self.__view_look_dom(cr, user, f, view_id, context))
  File "/opt/openerp-trunk/server/bin/osv/orm.py", line 1284, in __view_look_dom
    node.set('string', trans)
  File "lxml.etree.pyx", line 634, in lxml.etree._Element.set (src/lxml/lxml.etree.c:31548)
  File "apihelpers.pxi", line 487, in lxml.etree._setAttributeValue (src/lxml/lxml.etree.c:13896)
  File "apihelpers.pxi", line 1242, in lxml.etree._utf8 (src/lxml/lxml.etree.c:19848)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes

It works in the revision n°2543 so it must be in the modification of : bin/addons/base/ir/ir_translation.py

note that the proucts are registered in Portuguese.

Revision history for this message
xrg (xrg) wrote : Re: [Bug 610256] [NEW] value error when opening form view of a product

On Tuesday 27 July 2010, you wrote:
> Public bug reported:
>
> In the revision n° 2544 when opening a product in form view, it raises a
> value error :

> (src/lxml/lxml.etree.c:19848) ValueError: All strings must be XML
> compatible: Unicode or ASCII, no NULL bytes
>
> It works in the revision n°2543 so it must be in the modification of :
> bin/addons/base/ir/ir_translation.py
>
> note that the proucts are registered in Portuguese.
>
Only judging from the error description, (that resides in some C code), it
seems that you have slipped some invalid character (yes, utf8 can have bad
data) in your xml file. Please test it. You could xmllint it as well.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Vianney,

I checked with Portuguese language installed,but it does not crash at my end.

Would you please check again?

Thanks.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello, it seems our Brazilian community is confirming the bug,
I would like to highlight, this is occurring in TRUNK BRANCH, rev #2544
you may need to encode a product with non ASCII chars to be able to reproduce the issue eventually.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Yes Raphael, I agree to it.

I already had gone through the phase,but did not meet it.

I am trying again.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

As a matter of fact,
Fixes landed for 5.0 in revisions:
- 2120 <email address hidden>
- 2119 <email address hidden>

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.