Hi Alessandro, I have set use_transaction_manager=1 so I let tg handle all transactions. I have tried using different DBSession for AdminController which resolved this issue. Later on, I have reverted the changes and DB restart happened (due to some other reason), surprisingly I didnt see this issue after that. Will test this again after some time!! Thanks.
With Regards, Dinesh. On Thursday, 11 May 2017 10:30:45 UTC-7, D R Dinesh Kumar wrote: > > Hi All, > > I am using the following statement to create DB session > > maker = sessionmaker(autoflush=True, autocommit=False, > extension=ZopeTransactionExtension()) > DBSession = scoped_session(maker) > > and in my app, I have created model view admin controllers for user,group > etc. > when I try to edit users, I am hitting the following issue. > > File > "/remote/vtghome9/vgtools2/VPython2.7.13/lib/python2.7/site-packages/transaction/_transaction.py", > > line 423, in _commitResources > rm.tpc_vote(self) > File > "/remote/vtghome9/vgtools2/VPython2.7.13/lib/python2.7/site-packages/zope/sqlalchemy/datamanager.py", > > line 109, in tpc_vote > self.tx.commit() > File > "/remote/vtghome9/vgtools2/VPython2.7.13/lib/python2.7/site-packages/sqlalchemy/orm/session.py", > > line 459, in commit > self._assert_active(prepared_ok=True) > File > "/remote/vtghome9/vgtools2/VPython2.7.13/lib/python2.7/site-packages/sqlalchemy/orm/session.py", > > line 285, in _assert_active > raise sa_exc.ResourceClosedError(closed_msg) > ResourceClosedError: This transaction is closed > > Any help is greatly appreciated.!! > > Possible issue:: Since ZTE is used, calling .commit() explicitly is not > required. > > is there a way to handle this to create different session (without ZTE) > for AdminController to use? > > With Regards, > Dinesh. > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/d/optout.

