コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
10994 ビュー

i download product details from openerp. In that csv file i get image in binary format. When i try to upload data again some of the rows showing padding error ( Incorrect padding ). How to s solve this issue?

アバター
破棄
著作者

its a base64 decode error. i try to decode binary image value to .decode('base64') it show same error. how to solve this ?

最善の回答

When exporting images directly from PostgreSQL, convert PostgreSQL's bytea format to base64 using the following in the query:

select encode("product_product"."image",'base64') as "image" from "product_product";

Using .decode('base64') in Python will not work because the data first needs to be decoded from PostgreSQL's bytea format.

See also https://www.odoo.com/forum/help-1/question/export-external-id-directly-from-database-67297

アバター
破棄
関連投稿 返信 ビュー 活動
1
3月 18
3552
1
3月 16
3475
2
3月 15
10915
1
3月 15
9103
0
2月 23
2403