Thanks Michael.
This is happening intermittently, and the identitykey check is
happening just before trying to get it from the session_identity_map
in mapper.py.
I'm not putting anything in there myself, it's happening in the query
call.
So it seems to me the most likely culprit is another process/thread?

On Dec 11, 11:34 am, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> Jason wrote:
> > I'm seeing a keyerror in mapper.py where it does:
> > instance = session_identity_map[identitykey]
>
> > The strange this is, I see the code doing a check to make sure
> > identitykey is in the session_identity_map.
> > This is a table that's not being updated and it pretty much static.
> > Could another thread be removing the key?
> > Any help would be greatly appreciated.
>
> SQLA does not create any sessions or spawn any threads, so any confusion
> between multiple sessions or concurrent threading activity would originate
> from outside of SQLA.  I would advise to check that you're looking for the
> right key in identity_map and also note that you can't just "put" things
> in the map directly and expect it to work - use Session.add() for that.
>
>
>
>
>
> > Jason
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "sqlalchemy" group.
> > To post to this group, send email to sqlalch...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > sqlalchemy+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/sqlalchemy?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.


Reply via email to