콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
11055 화면

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
3609
1
3월 16
3548
2
3월 15
11005
1
3월 15
9218
0
2월 23
2479