Hi Kenny, OK, I see the problem. Your Mapping is given the AnnotationDB events as its target. You are looping over events.itervalues(), and in the middle of that loop you are adding to the Mapping. events.sliceDB is a SQLTable, I believe. Iteration over that SQLTable uses a cursor. Any operation that interacts with that SQLTable uses the same cursor, and will thus interfere with continuing the iteration of the SQLTable.
This is analogous to deleting objects from a dictionary d within an iterator loop (for v in d.itervalues():); the results are undefined because the statements inside the loop interfere with the iterator that is feeding the loop. You can't use an iterator in this case; you have to capture all of the values in a list before beginning to run the statements inside the loop. I.e. you can't use itervalues(); you have to use values(). -- Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to pygr-dev@googlegroups.com To unsubscribe from this group, send email to pygr-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en -~----------~----~----~----~------~----~------~--~---