I'm having the same issue with a Pyramid web app.
Did anyone find a solution?
I've tried Flup and Waitress as the containers for the pyramid app, and
I've tried Lighttpd and Nginx in front... no difference. My latest
exceptions look like:
Could not convert return value of the view callable
On Dec 28, 12:07 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 28, 2011, at 11:34 AM, Kent wrote:
Was it your intention to no longer allow this type of query().get()?
session.query(cls.orderid).get(orderid)
it was ! yes.
I get InvalidRequestError: get() can only be
in fact, I modified our Query class after .first() was being abused
out of laziness:
def first(self):
raise ProgrammingError(Never use .first(); please use .get()
or .one()\n
.one() makes sure there is only one return and .get()
returns None if doesn't exist.\n
Indeed! That's what I get for defining my tables based on the pdf my
manager gave me, instead of looking at the tables in psql directly.
Thanks, I was stuck looking at my code for the problem.
Craig
On May 16, 7:53 am, Michael Bayer mike...@zzzcomputing.com wrote:
On May 16, 2011, at 9:23 AM,
On Mar 14, 2011, at 6:14 PM, Ajay wrote:
Thanks Mike for your quick response.
I removed the zope.sqlalchemy extension and I am no longer getting the
zope error.
Since we are using a scoped_session, we don't think it's a threading
issue although we are running in a multi-threaded env.
Thanks Mike for your quick response.
I removed the zope.sqlalchemy extension and I am no longer getting the
zope error.
Since we are using a scoped_session, we don't think it's a threading
issue although we are running in a multi-threaded env.
I am trying to create this exception to occur in my
chingi wrote:
Hello,
In my application I have AJAX function which sends around 20
requests every 5 seconds to Server to update my web page.
But few requests fail to get values because of
invalidRequestError : The transaction is inactive due to a rollback
in a
Hello Michael,
Thank you for your replies. I've just tried to create a testcase but
proven to myself that it does raise an exception. I'll go back and
double check where I might be catching and passing on the exception.
Daniel
On Apr 29, 3:19 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Daniel wrote:
I've learned a bit more. Apparently the sqlite database occasionally
gets locked by another process and that lock lasts longer than the
five second default timeout. SQL Alchemy quietly issues a ROLLBACK,
but doesn't say anything more about it. The result is that the
session
how is it that you know this is due to the SQLite timeout ? did you
create a test case ? creating a fully reproducible test case would be
the next step.
On Apr 29, 2009, at 5:15 PM, Daniel wrote:
I'm not catching it or re-raising it. Where else could I look to
solve this.
On Apr
squelching typically means one of two things.
either you're doing this:
try:
# do stuff with session
except:
print error !
# .. keep going
or, you are allowing concurrent access to a single session with
multiple threads, one of your threads is throwing an exception
(usually
the message you're getting is due to an exception being raised,but
rollback() not being called on the session. When you catch those
ConcurrentModification exceptions, you have to issue a rollback().
I dont see anything else with the code that would suggest the same row
being deleted in
[mailto:[EMAIL PROTECTED]
On Behalf Of Michael Bayer
Sent: Tuesday, October 28, 2008 10:20 AM
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: InvalidRequestError and
ConcurrentModification problems
the message you're getting is due to an exception being raised,but
rollback
On Oct 28, 2008, at 1:57 PM, Doug Farrell wrote:
Michael,
I'm not sure why the ConcurrentModification is occurring at all, my
application doesn't use threads. I'll look into issuing the rollback()
call and see how that helps my app.
the concurrent ness of the error only means two
Hi,
I do a session.clear(), all time, after of
session.save_or_update([obj])
Can this be the problem?
That is almost certainly your problem. Try removing the session.clear()
and see if it then works.
When is advisable do a session.clear() ?
When you're done with a batch of processing.
hello, how are you,i use the delete() method ,but it have the same
exception, i see that you use the save_or_update() method , i look for the
document, but can't find a right method to do it,
thanks
2008/1/15, Rick Morrison [EMAIL PROTECTED]:
Well, the my_service.get_people() most likely uses
On Jan 20, 2008, at 10:03 AM, VitaminJ wrote:
Hi!
Is there a way to find out about the state an object is in? I am
particular interested to find out if there is the need to call
session.update() for an object or if the identidy is already contained
in the session. I cannot manage to do
Thanks for the great support and all the work!
Merge is exactly what I had in mind. The documentation for merge()
states what I was looking for:
This method is useful for bringing in objects which may have been
restored from a serialization,
such as those stored in an HTTP session, where the
On Jan 14, 2008, at 2:32 PM, maxi wrote:
Hi,
Follwing with my 0.3 to 0.4 upgrade, now I get the next problem...
When I try to save an object across my session, I get an
InvalidRequestError exception with the message:
File c:\programs\python25\lib\site-packages\sqlalchemy-0.4.2p3-
I must use save_update alone or save_update + flush ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this
flush() works exactly as before.
the difference that Mike is pointing out is that 0.3 allowed
already-persisted objects to be re-added, which was a bug that is now fixed.
Using save_or_update() instead of save() will help you avoid triggering the
error when the object you're trying to .save() is
But, is my design mistake ?
I must use ever save_or_update() function?
In my case, I have two process working over the same class of
bussines object.
I do a query, which return me an object list and I call to other
function which pass one parameter (id) and this function do other
query over the
Well, the my_service.get_people() most likely uses a query to retrieve those
people from the database, right? That query would have the effect of putting
those results into the session as persistent objects. When you call
session.save() on one of those already-persisted objects, the session checks
Jose Soares ha scritto:
Michael Bayer ha scritto:
not sure about that, i thought maybe the multiple flush()es are
breaking something but I just added a test case and it doesnt
reproduce. make sure youre on the most recent versions since that was
broken a few versions back...
then its likely a threading issue. not sure what your setup is but
you should make sure that the session is used in only a single
thread, typically via using a thread local variable (or using
SessionContext which provides this service).
On Jan 24, 2007, at 8:28 AM, Jose Soares wrote:
not sure about that, i thought maybe the multiple flush()es are
breaking something but I just added a test case and it doesnt
reproduce. make sure youre on the most recent versions since that was
broken a few versions back...
--~--~-~--~~~---~--~~
You received
26 matches
Mail list logo