Public bug reported:

Hi,

When fetching email (both emails and attachments) which is encoded 
'ISO-8859-1'/'GB18030,
I receive an error.

Reproduction procedure:
1. fetch an email encoded in 'ISO-8859-1'/'GB18030,

The traceback is :

Traceback (most recent call last):
  File "/opt/openerp/must/70/stable/addons/fetchmail/fetchmail.py", line 209, 
in fetch_mail
    context=context)
  File "/opt/openerp/must/70/stable/addons/mail/mail_thread.py", line 679, in 
message_process
    new_msg_id = model_pool.message_post(cr, uid, [thread_id], context=context, 
subtype='mail.mt_comment', **msg)
  File "/opt/openerp/must/70/stable/addons/mail/mail_thread.py", line 1135, in 
message_post
    msg_id = mail_message.create(cr, uid, values, context=context)
  File "/opt/openerp/must/70/stable/addons/mail/mail_message.py", line 750, in 
create
    newid = super(mail_message, self).create(cr, uid, values, context)
  File "/mnt/data/openerp/must/70/stable/server/openerp/osv/orm.py", line 4471, 
in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], 
user, rel_context) or []
  File "/mnt/data/openerp/must/70/stable/server/openerp/osv/fields.py", line 
757, in set
    idnew = obj.create(cr, user, act[2], context=context)
  File "/opt/openerp/must/70/stable/addons/document/document.py", line 125, in 
create
    return super(document_file, self).create(cr, uid, vals, context)
  File 
"/mnt/data/openerp/must/70/stable/server/openerp/addons/base/ir/ir_attachment.py",
 line 290, in create
    return super(ir_attachment, self).create(cr, uid, values, context)
  File "/mnt/data/openerp/must/70/stable/server/openerp/osv/orm.py", line 4436, 
in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values 
("+str(id_new)+upd1+')', tuple(upd2))
  File "/mnt/data/openerp/must/70/stable/server/openerp/sql_db.py", line 161, 
in wrapper
    return f(self, *args, **kwargs)
  File "/mnt/data/openerp/must/70/stable/server/openerp/sql_db.py", line 226, 
in execute
    res = self._obj.execute(query, params)
DataError: invalid byte sequence for encoding "UTF8": 0xd0c2

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1239621

Title:
  fetch email encoded in 'ISO-8859-1'/'GB18030'

Status in OpenERP Addons (modules):
  New

Bug description:
  Hi,

  When fetching email (both emails and attachments) which is encoded 
'ISO-8859-1'/'GB18030,
  I receive an error.

  Reproduction procedure:
  1. fetch an email encoded in 'ISO-8859-1'/'GB18030,

  The traceback is :

  Traceback (most recent call last):
    File "/opt/openerp/must/70/stable/addons/fetchmail/fetchmail.py", line 209, 
in fetch_mail
      context=context)
    File "/opt/openerp/must/70/stable/addons/mail/mail_thread.py", line 679, in 
message_process
      new_msg_id = model_pool.message_post(cr, uid, [thread_id], 
context=context, subtype='mail.mt_comment', **msg)
    File "/opt/openerp/must/70/stable/addons/mail/mail_thread.py", line 1135, 
in message_post
      msg_id = mail_message.create(cr, uid, values, context=context)
    File "/opt/openerp/must/70/stable/addons/mail/mail_message.py", line 750, 
in create
      newid = super(mail_message, self).create(cr, uid, values, context)
    File "/mnt/data/openerp/must/70/stable/server/openerp/osv/orm.py", line 
4471, in create
      result += self._columns[field].set(cr, self, id_new, field, vals[field], 
user, rel_context) or []
    File "/mnt/data/openerp/must/70/stable/server/openerp/osv/fields.py", line 
757, in set
      idnew = obj.create(cr, user, act[2], context=context)
    File "/opt/openerp/must/70/stable/addons/document/document.py", line 125, 
in create
      return super(document_file, self).create(cr, uid, vals, context)
    File 
"/mnt/data/openerp/must/70/stable/server/openerp/addons/base/ir/ir_attachment.py",
 line 290, in create
      return super(ir_attachment, self).create(cr, uid, values, context)
    File "/mnt/data/openerp/must/70/stable/server/openerp/osv/orm.py", line 
4436, in create
      cr.execute('insert into "'+self._table+'" (id'+upd0+") values 
("+str(id_new)+upd1+')', tuple(upd2))
    File "/mnt/data/openerp/must/70/stable/server/openerp/sql_db.py", line 161, 
in wrapper
      return f(self, *args, **kwargs)
    File "/mnt/data/openerp/must/70/stable/server/openerp/sql_db.py", line 226, 
in execute
      res = self._obj.execute(query, params)
  DataError: invalid byte sequence for encoding "UTF8": 0xd0c2

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1239621/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-india
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-india
More help   : https://help.launchpad.net/ListHelp

Reply via email to