← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 827906] [NEW] python error in attachment in send email

 

Public bug reported:

i can send email in lead. but when i try to attach a file, an error
comes out:


<type 'exceptions.TypeError'> Python 2.5.2: C:\Program Files (x86)\OpenERP 6.0\Web\openerp-web.exe
Wed Aug 17 17:15:45 2011 

A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.

 C:\Program Files (x86)\OpenERP 6.0\Web\cherrypy\_cprequest.pyo in respond(self=<cherrypy._cprequest.Request object at 0x02891ED0>, path_info='/openerp/openo2m/save') 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\cherrypy\_cpdispatch.pyo in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object at 0x02891EF0>) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_expose.pyo in func_wrapper(*args=(<openobject.controllers._root.Root object at 0x0154CC10>, 'openerp', 'openo2m', 'save'), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\openobject\controllers\_root.pyo in default(self=<openobject.controllers._root.Root object at 0x0154CC10>, *args=('openerp', 'openo2m', 'save'), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\cherrypy\_cpdispatch.pyo in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object at 0x034851F0>) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\controllers\utils.py in wrapper(*args=(), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
  110             # User is logged in; allow access
 
  111             clear_login_fields(kw)
 
  112             return fn(*args, **kw)
 
  113         else:
 
  114             action = kw.get('login_action', '')
 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_expose.pyo in func_wrapper(*args=(<openerp.controllers.openo2m.OpenO2M object at 0x03485910>,), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_validate.pyo in func_wrapper(*args=(<openerp.controllers.openo2m.OpenO2M object at 0x03485910>,), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_validate.pyo in (self=<openerp.controllers.openo2m.OpenO2M object at 0x03485910>) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\controllers\form.py in get_validation_schema(self=<openerp.controllers.openo2m.OpenO2M object at 0x03485910>) 
  128 
 
  129     kw = cherrypy.request.params
 
  130     params, data = TinyDict.split(kw)
 
  131 
 
  132     # bypass validations, if saving from button in non-editable view
 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\utils\utils.py in split(kwargs={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
  177                 data[n] = v
 
  178 
 
  179         return _make_dict(params, True), _make_dict(data, False)
 
  180 
 
  181     def make_plain(self, prefix=''):
 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\utils\utils.py in _make_dict(data={'attachment_ids/__id': '', 'attachment_ids/binary': FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00'), 'attachment_ids/name': 'bakcup.rtf'}, is_params=False) 
   79         return res
 
   80     
 
   81     return make_dict_internal(data, is_params, set())
 
   82 
 
   83 class TinyDict(dict):
 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\utils\utils.py in make_dict_internal(data={'attachment_ids/__id': '', 'attachment_ids/binary': FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00'), 'attachment_ids/name': 'bakcup.rtf'}, is_params=False, previous_dict_ids=set([67303296])) 
   68     
 
   69                     values = _make_dict(v, is_params)
 
   70                     if values and any(values.itervalues()):
 
   71                         res[k] = [(_id and 1, _id, values)]
 
   72                     else:
 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\cgi.pyo in __len__(self=FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00')) 
 
 C:\Program Files (x86)\OpenERP 6.0\Web\cgi.pyo in keys(self=FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00')) 
 

<type 'exceptions.TypeError'>: not indexable 
      args = ('not indexable',) 
      message = 'not indexable'

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

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/827906

Title:
  python error in attachment in send email

Status in OpenERP Modules (addons):
  New

Bug description:
  i can send email in lead. but when i try to attach a file, an error
  comes out:

  
  <type 'exceptions.TypeError'> Python 2.5.2: C:\Program Files (x86)\OpenERP 6.0\Web\openerp-web.exe
  Wed Aug 17 17:15:45 2011 

  A problem occurred in a Python script. Here is the sequence of
  function calls leading up to the error, in the order they occurred.

   C:\Program Files (x86)\OpenERP 6.0\Web\cherrypy\_cprequest.pyo in respond(self=<cherrypy._cprequest.Request object at 0x02891ED0>, path_info='/openerp/openo2m/save') 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\cherrypy\_cpdispatch.pyo in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object at 0x02891EF0>) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_expose.pyo in func_wrapper(*args=(<openobject.controllers._root.Root object at 0x0154CC10>, 'openerp', 'openo2m', 'save'), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\openobject\controllers\_root.pyo in default(self=<openobject.controllers._root.Root object at 0x0154CC10>, *args=('openerp', 'openo2m', 'save'), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\cherrypy\_cpdispatch.pyo in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object at 0x034851F0>) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\controllers\utils.py in wrapper(*args=(), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
    110             # User is logged in; allow access
   
    111             clear_login_fields(kw)
   
    112             return fn(*args, **kw)
   
    113         else:
   
    114             action = kw.get('login_action', '')
   
   
   C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_expose.pyo in func_wrapper(*args=(<openerp.controllers.openo2m.OpenO2M object at 0x03485910>,), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_validate.pyo in func_wrapper(*args=(<openerp.controllers.openo2m.OpenO2M object at 0x03485910>,), **kw={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\openobject\tools\_validate.pyo in (self=<openerp.controllers.openo2m.OpenO2M object at 0x03485910>) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\controllers\form.py in get_validation_schema(self=<openerp.controllers.openo2m.OpenO2M object at 0x03485910>) 
    128 
   
    129     kw = cherrypy.request.params
   
    130     params, data = TinyDict.split(kw)
   
    131 
   
    132     # bypass validations, if saving from button in non-editable view
   
   
   C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\utils\utils.py in split(kwargs={'_terp_close': '1', '_terp_filter_domain': '[]', '_terp_notebook_tab': '0', '_terp_o2m': 'attachment_ids', '_terp_o2m_context': '{}', '_terp_o2m_id': '', '_terp_o2m_model': 'crm.send.mail.attachment', '_terp_parent_context': 'None', '_terp_parent_id': '3', '_terp_parent_model': 'crm.send.mail', ...}) 
    177                 data[n] = v
   
    178 
   
    179         return _make_dict(params, True), _make_dict(data, False)
   
    180 
   
    181     def make_plain(self, prefix=''):
   
   
   C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\utils\utils.py in _make_dict(data={'attachment_ids/__id': '', 'attachment_ids/binary': FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00'), 'attachment_ids/name': 'bakcup.rtf'}, is_params=False) 
     79         return res
   
     80     
   
     81     return make_dict_internal(data, is_params, set())
   
     82 
   
     83 class TinyDict(dict):
   
   
   C:\Program Files (x86)\OpenERP 6.0\Web\addons\openerp\utils\utils.py in make_dict_internal(data={'attachment_ids/__id': '', 'attachment_ids/binary': FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00'), 'attachment_ids/name': 'bakcup.rtf'}, is_params=False, previous_dict_ids=set([67303296])) 
     68     
   
     69                     values = _make_dict(v, is_params)
   
     70                     if values and any(values.itervalues()):
   
     71                         res[k] = [(_id and 1, _id, values)]
   
     72                     else:
   
   
   C:\Program Files (x86)\OpenERP 6.0\Web\cgi.pyo in __len__(self=FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00')) 
   
   C:\Program Files (x86)\OpenERP 6.0\Web\cgi.pyo in keys(self=FieldStorage('attachment_ids/binary', 'bakcup.rt...go\\par\r\ncompany.url = \'\'\\par\r\n}\r\n\x00')) 
   

  <type 'exceptions.TypeError'>: not indexable 
        args = ('not indexable',) 
        message = 'not indexable'

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


Follow ups

References