[7.0] image import fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Prestashop OpenERP Connector |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Hello,
When we import products, the image import fails.
See the next traceback:
File "***/openerp_
job.
File "***/openerp_
self.result = self.func(session, *self.args, **self.kwargs)
File "***/openerp_
importer.
File "***/openerp_
super(
File "***/openerp_
erp_id
File "***/openerp_
self.
File "***/openerp_
self.
File "***/openerp_
values = meth(record)
File "***/openerp_
image = adapter.
File "***/openerp_
options=options
File "***/openerp_
image_content = base64.
AttributeError: 'tuple' object has no attribute 'content'
prestashoperpco
Regards,
Romain
description: | updated |
Hi my installed version is
prestapyt- 0.5.2-py2. 6 and with the connector , i managed to solve the above error and successfully
sync the product with images.
this is the patch needed , where the response[2] is the image
and the response[1] is the json string in the response of parameter 2.
backend_adapter.py from line 50 changed to below ,
if response[2]:
image_ content = base64. b64encode( response[ 2])
image_ content = ''
else:
return { 1]['content- type'],
'content' : image_content,
'id_ image': image_id
'type': response[
'id_' + resource[:-1]: resource_id,
}
hope that help ,
regards,
Kalmen