[7.0 trunk] Exception loading data into new DB - partner image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP's Framework R&D |
Bug Description
Have created a fresh openerp dev environment on Windows, using Python 2.7.3 and all latest python packages used by OpenERP.
Pulled trunk of server/addon/web. Server @4403.
Creating fresh database, I get the following exception, and I note there have been some very recent changes to the avatar stuff.
2012-09-09 08:33:00,430 5528 INFO test openerp.
2012-09-09 08:33:00,519 5528 INFO test openerp.
2012-09-09 08:33:07,388 5528 INFO test openerp.
2012-09-09 08:33:09,219 5528 ERROR test openerp.
<record id="main_partner" model="res.partner" context=
<field name="name">Your Company</field>
<field name="company_id" eval="None"/>
<field name="customer" eval="False"/>
<field name="is_company" eval="True"/>
<field name="street"/>
<field name="city"/>
<field name="zip"/>
<field name="phone"/>
<field name="email"><email address hidden></field>
<field name="website"
</record>
Traceback (most recent call last):
File "C:\dev\
self.
File "C:\dev\
id = self.pool.
File "C:\dev\
res_id = model_obj.
File "C:\dev\
return super(res_
File "C:\dev\
self.
File "C:\dev\
result = self._columns[
File "C:\dev\
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "C:\dev\
result[obj.id] = tools.image_
File "C:\dev\
if return_medium: return_
File "C:\dev\
return image_resize_
File "C:\dev\
image = Image.open(
File "C:\Tools\
raise IOError("cannot identify image file")
IOError: cannot identify image file
2012-09-09 08:33:09,374 5528 INFO test werkzeug: 127.0.0.1 - - [09/Sep/2012 08:33:09] "GET / HTTP/1.1" 200 -
it seems that the call to this function in res_partner.py gives the error
def _get_default_ image(self, cr, uid, is_company, context=None, colorize=False): modules. get_module_ resource( 'base', 'static\src\img', 'company_ image.png' )).read( ) colorize( open(openerp. modules. get_module_ resource( 'base', 'static/src/img', 'avatar. png')). read()) resize_ image_big( image.encode( 'base64' ))
if is_company:
image = open(openerp.
else:
image = tools.image_
return tools.image_
it's something with the image open().read that is wrong the str sent to the tools.image_ resize_ image_big( image.encode( 'base64' )) function seems weird
anyway if you want to be able to create a database you should comment the call to the function while this is causing problem... I don't know if it happens only under windows environment as I have also run this under windows in a eclipse dev env.
Hope it will help!
Cheers,
Houssine