also the item can be detached if it was deleted in a previous flush On Wed, Apr 22, 2020, at 8:57 PM, Jonathan Vanasco wrote: > I'm trying to figure out how I got a DetatchedInstanceError > > > DetachedInstanceError: Parent instance <AcmeAuthorization at 0x107a62b90> is > not bound to a Session; lazy load operation of attribute 'domain' cannot > proceed (Background on this error at: http://sqlalche.me/e/bhk3) > > This is happening in a web application where I never call > `dbSession.close()`. It does use zope.sqlalchemy for pyramid_tm, but > `keep_session` is True. I set `expire_on_commit=False` on the sessionmaker. > > Any tips on the best ways to troubleshoot how/where this is getting removed > from a session? > > > >
> -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/3e2d1a58-3f95-4021-9e3a-8b20fb9a2559%40googlegroups.com > > <https://groups.google.com/d/msgid/sqlalchemy/3e2d1a58-3f95-4021-9e3a-8b20fb9a2559%40googlegroups.com?utm_medium=email&utm_source=footer>. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/0b931af9-a9da-4b91-a34e-2975b73f4a64%40www.fastmail.com.