跳至内容
菜单
此问题已终结
1 回复
8347 查看

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

形象
丢弃
相关帖文 回复 查看 活动
1
8月 22
15217
1
5月 20
6050
2
7月 25
4667
2
12月 24
7794
2
11月 24
28571