[web2py] Re: cannot operate on a closed database

2014-05-10 Thread jc
Have you read the items that result from a search in this group on ProgrammingError: Cannot operate on a closed database? There a lot of hits with varyious causes. I had a similar problem the other day and the items which described my error were:

[web2py] Re: cannot operate on a closed database

2014-05-10 Thread Wonton
Hello Jc, Yes, I forgot to say that, but I read and tried all posts related to this issue, but none of them seems to be the cause of my problem. Anyway, since this morning everything is working again and *I haven't changed anything*!! But, it seems that the server has started to work again

[web2py] Re: cannot operate on a closed database

2014-05-09 Thread aleonserra
The error suggest that dal couldnt connect to the database. It doesnt look like a web2py problem but a db one. at line 4 add .select() to execute the statement. row = db(db.auth_user.username == username).select() Also start a web2py shell session (web2py -a yourpassword -M)and test the

[web2py] Re: cannot operate on a closed database

2014-05-09 Thread Wonton
Hello aleonserra, Thank you very much for your answer. The problem is that I have no admin access to the server so I cannot execute that command, and in my local server everything works fine, so I cannot replicate the error. On the other hand I've searched through all my code and I never close

Re: [web2py] Re: Cannot operate on a closed database

2011-09-06 Thread appydev
Why not so with: request = current.request? Is it safe to use the following? # modules/myobjects.py from gluon import * request,session,response,T,cache = current.request,current.session,current.response,current.T,current.cache and then use some class method : if form.accepts(request,

Re: [web2py] Re: Cannot operate on a closed database

2011-07-04 Thread Pierre Thibault
2011/6/26 Massimo Di Pierro massimo.dipie...@gmail.com I found the problem http://groups.google.com/group/web2py/msg/aaa803e14404fc62 This is not a problem with web2py. @ Pierre, I did found a non-related problem with web2py. models/meteo.py uses custom_import to import modules/meteo.py.

[web2py] Re: Cannot operate on a closed database

2011-07-04 Thread Pierre Thibault
2011/7/4 Massimo Di Pierro massimo.dipie...@gmail.com yes. Not sure what the error should be I created a ticket. Can you assign it to me? I think this is low priority. I take a look later. http://code.google.com/p/web2py/issues/detail?id=325 A+ - Pierre My blog and profile

[web2py] Re: Cannot operate on a closed database

2011-07-04 Thread Pierre Thibault
2011/7/4 Massimo Di Pierro massimo.dipie...@gmail.com I do not see an option to assign a ticket. You should be able to write, comment and close it anyway. Massimo I can only comment. I cannot change the status or the priority. I don't why. I have these options for my own Google projects

[web2py] Re: Cannot operate on a closed database

2011-07-04 Thread Massimo Di Pierro
email me when you want to change the status and I will. Not bit trouble. On Jul 4, 2011, at 2:50 PM, Pierre Thibault wrote: 2011/7/4 Massimo Di Pierro massimo.dipie...@gmail.com I do not see an option to assign a ticket. You should be able to write, comment and close it anyway. Massimo

[web2py] Re: Cannot operate on a closed database

2011-06-26 Thread Massimo Di Pierro
I found the cause it this problem. It is not a bug in web2py but something to be careful about in your programs. You have a models/meteo.py which imports modules/meteo.py. models/meteo.py does current.database = db and modules/mete.py does db = current.database the problem is that the

Re: [web2py] Re: Cannot operate on a closed database

2011-06-26 Thread Manuele Pesenti
On 26/06/2011 20:03, Massimo Di Pierro wrote: Hope this makes sense. thanks a lot I got it now :) Manuele

[web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Massimo Di Pierro
Is this is a sqlite or other? On Jun 24, 10:31 am, Manuele Pesenti manuele.pese...@gmail.com wrote: dear all, I've added a unique field to some existing tables and w2p gave me an error saing that he cannot add unique fields to a table so I deleted my db and restarted as a new application but

Re: [web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Manuele Pesenti
On 24/06/2011 20:13, Massimo Di Pierro wrote: Is this is a sqlite or other? yes, it was sqlite. At the moment I solved using postgres witrh pool_size=100 but I didn't try if this parameter is really necessary. what's the difference between the two db in this case?? Manuele

Re: [web2py] Re: Cannot operate on a closed database

2011-06-24 Thread pbreit
I don't think SQLite does pools. SQLite DBs are easy to deal with...just delete everything in the databases directory and start over. Might want to double-check that your connection string is pointing to the right place.

[web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Massimo Di Pierro
When you deleted the db, did you also delete the associated .table files? You should have On Jun 24, 10:31 am, Manuele Pesenti manuele.pese...@gmail.com wrote: dear all, I've added a unique field to some existing tables and w2p gave me an error saing that he cannot add unique fields to a table

Re: [web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Manuele Pesenti
On 24/06/2011 20:40, Massimo Di Pierro wrote: When you deleted the db, did you also delete the associated .table files? You should have everything in the databases directory... Manuele

[web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Massimo Di Pierro
I do not know. This is odd. Can you send me your app (confidentally)? On Jun 24, 1:50 pm, Manuele Pesenti manuele.pese...@gmail.com wrote: On 24/06/2011 20:40, Massimo Di Pierro wrote: When you deleted the db, did you also delete the associated .table files? You should have everything in