← Back to team overview

openerp-india team mailing list archive

[Bug 1049079] [NEW] [7.0dev trunk @r4411] Exception with default partner avatars on Windows?

 

Public bug reported:

This exception is being experienced on a freshly created database...
suspect this exception may not be showing up under Linux?

My PIL version is 1.1.7  for Python 2.7   (on Python 2.7.3 Win7)

Have had a quick look in debugger... PIL is not correctly identifying
the default avatar image stream as PNG.  Not clear if the problem is in
the way the image is represented in the database record, or in the way
it is pulled and decoded.

Renders server unusable.

Client Traceback (most recent call last):
  File "C:\dev\workspace\openobject-web\addons\web\common\http.py", line 182, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "C:\dev\workspace\openobject-web\addons\web\controllers\main.py", line 1181, in call_button
    action = self.call_common(req, model, method, args, domain_id, context_id)
  File "C:\dev\workspace\openobject-web\addons\web\controllers\main.py", line 1115, in call_common
    return self._call_kw(req, model, method, args, {})
  File "C:\dev\workspace\openobject-web\addons\web\controllers\main.py", line 1139, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "C:\dev\workspace\openobject-web\addons\web\common\openerplib\main.py", line 250, in proxy
    args, kw)
  File "C:\dev\workspace\openobject-web\addons\web\common\openerplib\main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "C:\dev\workspace\openobject-web\addons\web\common\session.py", line 66, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)


Server Traceback (most recent call last):
  File "C:\dev\workspace\openobject-web\addons\web\common\session.py", line 51, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "C:\dev\workspace\openobject-server\openerp\netsvc.py", line 362, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "C:\dev\workspace\openobject-server\openerp\service\web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "C:\dev\workspace\openerp-banking-addons\account_banking\wizard\bank_import.py", line 306, in import_statements_file
    import_transaction_obj.match(cursor, uid, transaction_ids, results=results, context=context)
  File "C:\dev\workspace\openerp-banking-addons\account_banking\banking_import_transaction.py", line 1313, in match
    country_code, results['log']
  File "C:\dev\workspace\openerp-banking-addons\account_banking\wizard\banktools.py", line 177, in get_or_create_partner
    'country_id': country_id,
  File "C:\dev\workspace\openobject-server\openerp\addons\base\res\res_partner.py", line 323, in create
    return super(res_partner,self).create(cr, uid, vals, context=context)
  File "C:\dev\workspace\openobject-addons\mail\mail_thread.py", line 182, in create
    thread_id = super(mail_thread, self).create(cr, uid, vals, context=context)
  File "C:\dev\workspace\openobject-server\openerp\osv\orm.py", line 4180, in create
    vals = self._add_missing_default_values(cr, user, vals, context)
  File "C:\dev\workspace\openobject-server\openerp\osv\orm.py", line 2410, in _add_missing_default_values
    defaults = self.default_get(cr, uid, missing_defaults, context)
  File "C:\dev\workspace\openobject-server\openerp\osv\orm.py", line 1506, in default_get
    defaults[f] = self._defaults[f](self, cr, uid, context)
  File "C:\dev\workspace\openobject-server\openerp\addons\base\res\res_partner.py", line 245, in <lambda>
    'image': lambda self, cr, uid, ctx: self._get_default_image(cr, uid, ctx.get('default_is_company', False), ctx),
  File "C:\dev\workspace\openobject-server\openerp\addons\base\res\res_partner.py", line 231, in _get_default_image
    image = tools.image_colorize(open(openerp.modules.get_module_resource('base', 'static/src/img', 'avatar.png')).read())
  File "C:\dev\workspace\openobject-server\openerp\tools\image.py", line 113, in image_colorize
    original = Image.open(io.BytesIO(original))
  File "C:\Tools\Python27\lib\site-packages\PIL\Image.py", line 1980, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

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

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

Title:
  [7.0dev  trunk @r4411] Exception with default partner avatars on
  Windows?

Status in OpenERP Server:
  New

Bug description:
  This exception is being experienced on a freshly created database...
  suspect this exception may not be showing up under Linux?

  My PIL version is 1.1.7  for Python 2.7   (on Python 2.7.3 Win7)

  Have had a quick look in debugger... PIL is not correctly identifying
  the default avatar image stream as PNG.  Not clear if the problem is
  in the way the image is represented in the database record, or in the
  way it is pulled and decoded.

  Renders server unusable.

  Client Traceback (most recent call last):
    File "C:\dev\workspace\openobject-web\addons\web\common\http.py", line 182, in dispatch
      response["result"] = method(controller, self, **self.params)
    File "C:\dev\workspace\openobject-web\addons\web\controllers\main.py", line 1181, in call_button
      action = self.call_common(req, model, method, args, domain_id, context_id)
    File "C:\dev\workspace\openobject-web\addons\web\controllers\main.py", line 1115, in call_common
      return self._call_kw(req, model, method, args, {})
    File "C:\dev\workspace\openobject-web\addons\web\controllers\main.py", line 1139, in _call_kw
      return getattr(req.session.model(model), method)(*args, **kwargs)
    File "C:\dev\workspace\openobject-web\addons\web\common\openerplib\main.py", line 250, in proxy
      args, kw)
    File "C:\dev\workspace\openobject-web\addons\web\common\openerplib\main.py", line 117, in proxy
      result = self.connector.send(self.service_name, method, *args)
    File "C:\dev\workspace\openobject-web\addons\web\common\session.py", line 66, in send
      raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

  
  Server Traceback (most recent call last):
    File "C:\dev\workspace\openobject-web\addons\web\common\session.py", line 51, in send
      return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "C:\dev\workspace\openobject-server\openerp\netsvc.py", line 362, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "C:\dev\workspace\openobject-server\openerp\service\web_services.py", line 586, in dispatch
      res = fn(db, uid, *params)
    File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 167, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "C:\dev\workspace\openobject-server\openerp\osv\osv.py", line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "C:\dev\workspace\openerp-banking-addons\account_banking\wizard\bank_import.py", line 306, in import_statements_file
      import_transaction_obj.match(cursor, uid, transaction_ids, results=results, context=context)
    File "C:\dev\workspace\openerp-banking-addons\account_banking\banking_import_transaction.py", line 1313, in match
      country_code, results['log']
    File "C:\dev\workspace\openerp-banking-addons\account_banking\wizard\banktools.py", line 177, in get_or_create_partner
      'country_id': country_id,
    File "C:\dev\workspace\openobject-server\openerp\addons\base\res\res_partner.py", line 323, in create
      return super(res_partner,self).create(cr, uid, vals, context=context)
    File "C:\dev\workspace\openobject-addons\mail\mail_thread.py", line 182, in create
      thread_id = super(mail_thread, self).create(cr, uid, vals, context=context)
    File "C:\dev\workspace\openobject-server\openerp\osv\orm.py", line 4180, in create
      vals = self._add_missing_default_values(cr, user, vals, context)
    File "C:\dev\workspace\openobject-server\openerp\osv\orm.py", line 2410, in _add_missing_default_values
      defaults = self.default_get(cr, uid, missing_defaults, context)
    File "C:\dev\workspace\openobject-server\openerp\osv\orm.py", line 1506, in default_get
      defaults[f] = self._defaults[f](self, cr, uid, context)
    File "C:\dev\workspace\openobject-server\openerp\addons\base\res\res_partner.py", line 245, in <lambda>
      'image': lambda self, cr, uid, ctx: self._get_default_image(cr, uid, ctx.get('default_is_company', False), ctx),
    File "C:\dev\workspace\openobject-server\openerp\addons\base\res\res_partner.py", line 231, in _get_default_image
      image = tools.image_colorize(open(openerp.modules.get_module_resource('base', 'static/src/img', 'avatar.png')).read())
    File "C:\dev\workspace\openobject-server\openerp\tools\image.py", line 113, in image_colorize
      original = Image.open(io.BytesIO(original))
    File "C:\Tools\Python27\lib\site-packages\PIL\Image.py", line 1980, in open
      raise IOError("cannot identify image file")
  IOError: cannot identify image file

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


Follow ups

References