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 once
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:
https://groups.google.com/forum/#!searchin/web
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
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 -M)and test the
database by executi
Think the combination of persistant logger object and SQLite threading
issues makes this too hard (couldn't get it working with commit() either)-
I'll look for a simpler solution.
(PS- For non web2py-DAL sqlite logging, I stumbled upon a thread safe class
I built a while back- still works, in c
After
self.log_db.log.insert(**args)
you need
self.log_db.commit()
every http request, the models, are executed, DAL(...) connects you to the
db (or recycles a connection from the pool), then when the action is done,
it automatically commits or rollsback, then web2py closes the connection.
I
Massimo- see revised - this is one model file and now I'm defining the db
in the constructor, but I get the "Cannot operate on a closed database"
error immediately.
import logging
import logging.handlers
class AppHandler(logging.Handler): # Inherit from logging.Handler
def __init__(self):
Is this one or two files?
If the model is passing db to the logger then the db is closed when the
first request responds.
The logger must make its own connection to the db and commit
On Friday, 11 May 2012 14:28:22 UTC-5, Yarin wrote:
>
> Here is my complete model code for a sqlite logging handl
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, session):
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
> 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 co
2011/7/4 Massimo Di Pierro
> 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 but I don't know how i
2011/7/4 Massimo Di Pierro
> 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
(http://pierrethibault.poster
2011/6/26 Massimo Di Pierro
> 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. The latter
> impo
On 26/06/2011 20:03, Massimo Di Pierro wrote:
Hope this makes sense.
thanks a lot
I got it now :)
Manuele
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 l
I do not know. This is odd. Can you send me your app (confidentally)?
On Jun 24, 1:50 pm, Manuele Pesenti 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 the databases dire
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
When you deleted the db, did you also delete the associated .table
files? You should have
On Jun 24, 10:31 am, Manuele Pesenti
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 a
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.
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
Is this is a sqlite or other?
On Jun 24, 10:31 am, Manuele Pesenti
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 I obtained this:
>
> P
21 matches
Mail list logo