Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
8320 Переглядів

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
15198
1
трав. 20
6028
2
лип. 25
4649
2
груд. 24
7784
2
лист. 24
28559