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

Hi Guys, while importing data from csv file through a customized function, i am getting this error,

current transaction is aborted commands ignored until end of transaction block

I know this is due to some DB operation occuring in a Transaction(where previous operation had some issue in same transaction)

so i can keep and exception to handle this.

But i would like to have a better way to handle this exception or is there any particular exception handler to handle this kind of Exception.

any help would be appreciated.

아바타
취소

You should also try looking at the PostgreSQL logs to check what's causing the exception

베스트 답변

ODOO use Psycopg for PostgreSQL connection .
You can  place your code inside the try catch block and

  Use psycopg2.Error  or psycopg2. IntregrityError   for exception handling .

Hope this may help in your case.

아바타
취소
관련 게시물 답글 화면 활동
2
8월 25
2029
1
7월 25
631
1
8월 25
1150
0
5월 25
1240
2
4월 25
3319