On Feb 22, 2015, at 10:09 PM, Ed Rahn edsr...@gmail.com wrote:
I am occassionally and randomly getting a DetachedInstanceError when I try to
access an object atttribute that is a reference. I will run this several
thousand times and only get it twice. What I don't understand is I use
I am occassionally and randomly getting a DetachedInstanceError when I try to
access an object atttribute that is a reference. I will run this several
thousand times and only get it twice. What I don't understand is I use the same
exact base query, which is where the reference takes place, and
I seem to get this after I call a transaction.commit
sqlalchemy.orm.exc.DetachedInstanceError
DetachedInstanceError: Instance Useraccount at 0x103f9f610 is
not bound to a Session; attribute refresh operation cannot proceed
In the following code, the first call will print the id [ i
On Tue, Feb 14, 2012 at 6:48 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
I will admit that i have some janky db sessioning stuff going on
behind the scenes as I get used to pyramid and the new sqlalchemy.
Then I'd say the janky db sessioning stuff going on behind the
scenes is closing
Hi,
I have an objects that when I convert to a string using __repr__
throws a DetachedInstanceError. If I access any of their members or
test the session (using 'user in Session') everything is fine but if I
check 'self in Session' in __repr__ the result is False.
I can reattach it to the Session
On Apr 7, 2011, at 9:54 PM, BenH wrote:
Hi,
I have an objects that when I convert to a string using __repr__
throws a DetachedInstanceError. If I access any of their members or
test the session (using 'user in Session') everything is fine but if I
check 'self in Session' in __repr__ the
Hi everyone!
I have a client-server application that communicates like this: the
client asks for something, the server fetches the data using
SQLAlchemy, serializes it and sends it back to the client. Now the
client can modify the data and send it back to the server for
persistence. It works
On Feb 11, 2011, at 7:43 AM, Joril wrote:
Hi everyone!
I have a client-server application that communicates like this: the
client asks for something, the server fetches the data using
SQLAlchemy, serializes it and sends it back to the client. Now the
client can modify the data and send it
I'm obviously missing some key concept as regards the management of sessions.
This seemingly simple usage fails:
def get_new():
sess = Session()
new = Something() # new orm object
sess.add(new)
sess.commit()
sess.close()
return new
new = get_new() # request a new
On Aug 14, 2010, at 12:53 PM, Michael Hipp wrote:
I'm obviously missing some key concept as regards the management of sessions.
This seemingly simple usage fails:
def get_new():
sess = Session()
new = Something() # new orm object
sess.add(new)
sess.commit()
Michael
Thanks for taking the time to formulate a very thorough answer. (Now if I can
make my understanding be as thorough.)
If you could suffer me one more question ... it appears there are two* ways to
handle this inside a method that may not know where it's called from.
def
On Aug 14, 2010, at 3:00 PM, Michael Hipp wrote:
Michael
Thanks for taking the time to formulate a very thorough answer. (Now if I can
make my understanding be as thorough.)
If you could suffer me one more question ... it appears there are two* ways
to handle this inside a method that
On 8/14/2010 2:29 PM, Michael Bayer wrote:
The approach above may be fine for your needs but I wouldn't encourage it. The
demarcation of transaction boundaries shouldn't be an ad-hoc thing IMO and
granular functions shouldn't be deciding whether or not they are setting up a
transaction.
On Aug 14, 2010, at 3:54 PM, Michael Hipp wrote:
On 8/14/2010 2:29 PM, Michael Bayer wrote:
The approach above may be fine for your needs but I wouldn't encourage it.
The demarcation of transaction boundaries shouldn't be an ad-hoc thing IMO
and granular functions shouldn't be deciding
14 matches
Mail list logo