Comment 19 for bug 899794

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: [Bug 899794] Re: [6.1] random requests fail with "TypeError: can't escape non-string object"

On 02/20/2012 12:19 PM, tamnil wrote:
> as described in bug: Bug #919982 by ruy medeiros
> _symbol_f = lambda symb: symb and Binary(str(symb)) or None
<SNIP>
>
> on line 296 of osv/fields.py
>
> Again, I have no idea whatsoever if this is the right fix, I'm sure this
> is where the problem is caused though.

Tanmil, Rui, thanks for the very insightful details. I think we are coming
close to the root of the problem. There may indeed be some changes in OpenERP
6.1 that can cause certain binary blobs to be transferred as unicode strings
instead of 8-bit strings.

Would any of you guys mind sharing the image or binary that causes the issue to
occur for you? This could in fact be related to the actual binary content of
the file, and thus could be image-specific.

Based on this we should be able to provide a proper fix (the workaround of Rui
is not bad, but a little bit more of analysis is required)

Thanks!