Odoo Help


OperationalError: Unable to use a closed cursor.

on 6/5/13, 3:47 AM 8,324 views

hi... while creating a new database in open erp v7.0 this error will be displayed ...

Client Traceback (most recent call last):
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\http.py", line 204, in dispatch
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\controllers\main.py", line 769, in create
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 31, in proxy_method
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 104, in send

Server Traceback (most recent call last):
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 90, in send
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\.\openerp\netsvc.py", line 293, in dispatch_rpc
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\.\openerp\service\web_services.py", line 122, in dispatch
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\.\openerp\service\web_services.py", line 168, in exp_create_database
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\.\openerp\service\web_services.py", line 98, in _initialize_db
  File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\.\openerp\sql_db.py", line 160, in wrapper
OperationalError: Unable to use a closed cursor...

please help me to find a soloution ..

Its one of OpenERP reputed bugs, no worries. Nothing matter related to reinstallation of openerp, just check postgresql db config and openerp config.

on 7/15/13, 8:02 AM

Thanks for your valuable comments

on 7/15/13, 10:41 AM

I just restart the server, then i can create db :)

on 10/18/13, 7:27 AM

I have the same problem, I restarted the server but without success, I modified the base module on res_partner.py, But I canceled the change I made, restarted the server, same problem ....

Yassine TEIMI
on 12/31/14, 10:35 AM

@zahin : I found that I missed some changes on the /etc/openerp-server.conf, I corrected it restarted the server but no changes. I'm looking for postgresql db config, can you tell me the path for it ?

Yassine TEIMI
on 12/31/14, 11:01 AM

Which are the parameters that I should change in the openerp cofiguration file?

Versão Integral, Anabela Damas
on 10/9/15, 5:26 AM
dorsaf dhouibi
On 11/18/17, 3:21 AM

the problem is the config file of your odoo version was changed somehow, i face this problem and when i put the default configuration of my odoo config file everything work fine




| 5 4 7
Baarn, Netherlands
On 6/5/13, 4:30 AM

Error talks about a closed cursor, and the last line in the trace you see sql_db.py.

So somehow during the creation of a new DB, the sql connection is closed.

Did you install additional modules, or have you modified code yourself?

Try to install the latest version of openERP7 on your system, it might be a bug or known issue with your version (may 9, 2013).

hi.. I have the latest version of openerp which is installed on may -9. 2013. yesterday i created a new module and installed on the openerp....

on 6/5/13, 6:45 AM

Your module probably does some kind of action with SQL, if your own module is the only thing you have added (besides default modules from openERP). Can you post your module in your question?

on 6/5/13, 5:41 PM
Yassine TEIMI
On 12/31/14, 1:22 PM

I have the same problem, did you get a solution ?

I found that on /etc/openerp-server.conf I should put on db_password, the password of the role attrbuted to openerp user, I corrected this error, restarted the server but same problem occurs.


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/5/13, 3:47 AM
Seen: 8324 times
Last updated: 11/18/17, 3:21 AM