openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16078
[Bug 948770] Re: image in binary field is not displayed in openerp server 6.03 but the image is displayed in openerp server in development PC
I have this problem when i edit a image and save.
Server Traceback (most recent call last):
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/addons/web/common/http.py", line 593, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/service/web_services.py", line 586, in dispatch
res = fn(db, uid, *params)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/osv.py", line 167, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/orm.py", line 4047, in write
self.pool.get(object)._store_set_values(cr, user, todo, fields_to_recompute, context)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/orm.py", line 4388, in _store_set_values
result = self._columns[f].get(cr, self, ids, f, SUPERUSER_ID, context=context)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/osv/fields.py", line 1129, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/home/ejem/openerp/6.1.new/server/6.1/openerp/addons/point_of_sale/point_of_sale.py", line 767, in _get_small_image
image_stream = io.BytesIO(obj.product_image.decode('base64'))
File "/usr/lib/python2.6/encodings/base64_codec.py", line 42, in base64_decode
output = base64.decodestring(input)
File "/usr/lib/python2.6/base64.py", line 321, in decodestring
return binascii.a2b_base64(s)
Error: Incorrect padding
Please help, thanks!!!
--
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/948770
Title:
image in binary field is not displayed in openerp server 6.03 but the
image is displayed in openerp server in development PC
Status in OpenERP Server:
Confirmed
Bug description:
On Openerp-client 6.03 image field is not displayed. When upload a picture on the openerp-server 6.03, binary field value was stored correctly. But when display the image openerp-server or openerp-client does not display the image.
But restored the database and run the code on local server the image displayed normally.
I set debug_level to debug_rpc on 2 PC and compared log of the photo field of employee.
On the 64 bit server :
[2012-03-07 12:12:46,283][tpp4erpdb] DEBUG_RPC_ANSWER:result: 'photo': 'x2f396a2f34414151536b5a4a5267414241674541554142514141442f3451365352141414141414251414b414138414641415........'
On the local PC
[2012-03-07 13:53:57,740][tpp4erpdb_20120307] DEBUG_RPC_ANSWER:result:
'photo':
'/9j/4AAQSkZJRgABAgEAUABQAAD/4Q6SRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUA\nAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAcAAAAcgEyAAIAAAAUAAAAjod
Image data of binary field is different. On the 64 bit server the data is same as data selecting the field in postgres psql.
Please kindly help correct this problem.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/948770/+subscriptions
References