Hey Mike, I've found and fixed (with help) my problem, but I thought I'd describe it here to support anyone else who hits this... Was not a threading issue......it was a combination of:
- data-edge case - bug in our code - bug in how SA was reporting a failure... I was adding a model object to the session as follows: rec = get_or_create(sess, CtrAtt, ctrAttSearchVals, ctrAttNewVals ) sess.add(rec) next I was looking up a record that was needed as an FKEY to the CtrAtt record I just put in the session (oops.....our bug) cot = sess.query(ContribTitle).get(int(cot_gem_id)) That query was of course flushing the session...but the record sought via "ContribTitle" was not found (the data-edge case) When SA saw the FKEY integrity error, it was attempting to roll-back the transaction.....and it was not showing the DB Integrity error.... Somewhere in that process, SA attempted to access a null "impl" object and confusingly throwing the: 'NoneType' object has no attribute 'accepts_scalar_loader' Regards, Dewey On Wednesday, September 16, 2015 at 6:24:47 PM UTC-5, Michael Bayer wrote: > > check out this case, this is one way to reproduce that: > > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3532/detect-property-being-assigned-to-more > > > > On 9/15/15 3:56 PM, dewey wrote: > > I'll see if I can reproduce this in a simple example.....it's currently in > a job being run every night from a Celery-Beat scheduler...... > > Interestingly, just changing the data in the DB made this problem go away > temporarily.......we were seeing this error thrown every night on staging > for 5 days straight, > But after we copied the Prod data into staging, it went away for about a > week..... > > This morning, it threw on both staging and prod......first time we've seen > it in Prod.... > > Thanks for your thoughts... > Dewey > -- > 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 [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. > > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
