Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8340 มุมมอง

Hello,


I use odoo 10 and import products with my own code. This is working, but I added now a function, to save some infos and reload at next import:

if (os.path.isfile(self.data_path + '/remainingAccessories.npy')):
logger.info("load saved remaining Accessories file: " + self.data_path + '/remainingAccessories.npy')
remainingAccessories = np.load(self.data_path + '/remainingAccessories.npy')
logger.info("remaining Accessories size : " + len(remainingAccessories))
else:
remainingAccessories = {
}


The probem is always (np.load) ... when the code reach this line, I get:

WARNING company odoo.sql_db: Cursor not closed explicitly

When I use this line in a own python programm, I get no problem. And why are loading  numpy saved file run in a SQL error?


Thank you! 


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Ok, I found it:

there was an error in the code and the exception are not printed. So I thought it is a sql problem.


We can close here

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to use cr.execute? แก้ไขแล้ว
1
ส.ค. 22
15214
1
พ.ค. 20
6046
2
ก.ค. 25
4664
2
ธ.ค. 24
7792
How to ORDER BY? [Odoo 10] แก้ไขแล้ว
2
พ.ย. 24
28567