The code bellow throwing error ObjectDeletedError: Instance 'xxx' has been
deleted. when an exception throwing from method1.
How fix this issue.
def main_method():
DBSession.add(db_obj1)
DBSession.fush()
for x in lst:
method1(db_obj1.id)
def method1(id):
try:
The code bellow throwing error ObjectDeletedError: Instance 'xxx' has been
deleted. when a exception throwing from method1.
Eroor in line method1(db_obj1.id), db_obj1.id failing.
How fix this issue.
def main_method():
DBSession.add(db_obj1)
DBSession.fush()
for x in lst:
In a pyramid application:
In models.py: DBSession=
scoped_session(sessionmaker(extensions=ZopeTransactionExtension()))
In view: dbsession = DBSession
def add(request):
#get implant1
dbsession.add(implant)
transaction.commit()
Hello,
Any idea what this error message means.
I'm trying to execute this:
s=session.execute(assp_Checks @begin_date=:start,
@end_date=:end,@company_id=1,params={'start':date_to_process,'end':date_to_process}).fetchall()
I get:
Traceback (most recent call last):
File stdin, line 1, in module
Thanks Michael.
On 11/15/2012 08:41 PM, Michael Bayer wrote:
that's possible, it's a pretty old, little used, API, and that
document probably assumes GC will pick up on it, and it would be
better if dispose() was called on the pool all the way through. But
the garbage collector should be
On Nov 15, 10:48 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Nov 15, 2012, at 7:33 PM, Rob Crowell wrote:
Sorry, that got cut off at the end.
class IssueTag(Base):
__tablename__ = 'issue_user_tag'
sqlalchemy.exc.InvalidRequestError: Table 'issue_user_tag' is
On Nov 16, 2012, at 2:59 PM, Rob Crowell wrote:
Thanks for the help so far Michael! I can explain a little more about
what I'm trying to do (I'm using a fictional application here but I
think it pretty accurately translates into my actual application).
BACKGROUND
--
Let's
On Nov 16, 2012, at 11:44 AM, Lukasz Szybalski wrote:
Hello,
Any idea what this error message means.
I'm trying to execute this:
s=session.execute(assp_Checks @begin_date=:start,
@end_date=:end,@company_id=1,params={'start':date_to_process,'end':date_to_process}).fetchall()
I get:
H, Michael Bayer
Thanks
You are correct, the rollback in method1 rollbacking transaction in
main_method.
I want to isolate transaction in main_method from rollback in method1.
I attached more code.
from sqlalchemy.orm import scoped_session, sessionmaker
maker = sessionmaker(autoflush=True,