str error when download full mail

Hello,

When i try to download full mail i get this error

Environment Information :
System : Linux-2.6.28-15-generic-i686-with-Ubuntu-9.04-jaunty
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
Operating System Release : 2.6.28-15-generic
Operating System Version : #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009
Operating System Architecture : 32bit
Operating System Locale : fr_FR.UTF8
Python Version : 2.6.2
OpenERP-Client Version : 5.0.4
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/bruno/pgi_2/server_pgi/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/bruno/pgi_2/server_pgi/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/audittrail/audittrail.py", line 346, in execute
    res = my_fct(db, uid, passwd, object, method, *args)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/audittrail/audittrail.py", line 336, in my_fct
    return fct_src(db, uid, passwd, object, method, *args)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/base_module_record/base_module_record.py", line 38, in execute
    res = super(recording_objects_proxy, self).execute(*args, **argv)
  File "/home/bruno/pgi_2/server_pgi/bin/service/web_services.py", line 583, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/bruno/pgi_2/server_pgi/bin/osv/osv.py", line 59, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/bruno/pgi_2/server_pgi/bin/osv/osv.py", line 118, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/bruno/pgi_2/server_pgi/bin/osv/osv.py", line 110, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/poweremail/poweremail_mailbox.py", line 97, in complete_mail
    self.pool.get('poweremail.core_accounts').get_fullmail(cr,uid,id,ctx)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/poweremail/poweremail_core.py", line 592, in get_fullmail
    self.complete_mail(cr,uid,mail,id,server_ref,mailid)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/poweremail/poweremail_core.py", line 422, in complete_mail
    vals['pem_body_text']=mail.get_payload(0).get_payload(0)
  File "/usr/lib/python2.6/email/message.py", line 189, in get_payload
    raise TypeError('Expected list, got %s' % type(self._payload))
TypeError: Expected list, got <type 'str'>

Maybe, i made a mistake ??

Question information

Language:
English Edit question
Status:
Solved
For:
Power Email Edit question
Assignee:
No assignee Edit question
Solved by:
Sharoon Thomas http://openlabs.co.in
Solved:
Last query:
Last reply:
Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) said :
#1

Hi,

I have tried recreating the issue, but could not.

Can you forward me the mail, (no problem if content is changed) which caused this error?

Looks like i cant rely anymore on the MIMEtype declared on the mail headers. The content is different from the MIMEtype.

Revision history for this message
Bruno JOLIVEAU - www.savoirfairelinux.com (zeekom) said :
#2

Hi Sharoon,

I have just try a new issue and i met a new error with this mail.

I forward you this two mails on your private email.

Thanks

Bruno

Message for this new error

Environment Information :
System : Linux-2.6.28-15-generic-i686-with-Ubuntu-9.04-jaunty
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
Operating System Release : 2.6.28-15-generic
Operating System Version : #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009
Operating System Architecture : 32bit
Operating System Locale : fr_FR.UTF8
Python Version : 2.6.2
OpenERP-Client Version : 5.0.4
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/bruno/pgi_2/server_pgi/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/bruno/pgi_2/server_pgi/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/audittrail/audittrail.py", line 346, in execute
    res = my_fct(db, uid, passwd, object, method, *args)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/audittrail/audittrail.py", line 336, in my_fct
    return fct_src(db, uid, passwd, object, method, *args)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/base_module_record/base_module_record.py", line 38, in execute
    res = super(recording_objects_proxy, self).execute(*args, **argv)
  File "/home/bruno/pgi_2/server_pgi/bin/service/web_services.py", line 583, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/bruno/pgi_2/server_pgi/bin/osv/osv.py", line 59, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/bruno/pgi_2/server_pgi/bin/osv/osv.py", line 118, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/bruno/pgi_2/server_pgi/bin/osv/osv.py", line 110, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/poweremail/poweremail_mailbox.py", line 97, in complete_mail
    self.pool.get('poweremail.core_accounts').get_fullmail(cr,uid,id,ctx)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/poweremail/poweremail_core.py", line 592, in get_fullmail
    self.complete_mail(cr,uid,mail,id,server_ref,mailid)
  File "/home/bruno/pgi_2/server_pgi/bin/addons/poweremail/poweremail_core.py", line 433, in complete_mail
    print "crid",crid
UnboundLocalError: local variable 'crid' referenced before assignment

Revision history for this message
Best Sharoon Thomas http://openlabs.co.in (sharoonthomas) said :
#3

Fixed in commit 88

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) said :
#4

The error was that a debug print statement remained in the code.
It has been fixed in commit version 88.

Will appear in 0.7 (or download latest trunk)

Revision history for this message
Bruno JOLIVEAU - www.savoirfairelinux.com (zeekom) said :
#5

Thanks Sharoon Thomas (openlabs.co.in), that solved my question.