Hello<b>,<br></b>I&#39;m having quite a strange problem and I really don&#39;t know the reason why it is occurring.<br>Briefly, my database is storing data of chat rooms, according to different indexes (by the user who created the chat room, by the chat room ID, etc).<br>

<br>From the DB root there&#39;s an OOBTree with all the kind of indexes. In this case I&#39;ll focus in the index &#39;IndexByConf&#39; because it&#39;s the one I&#39;ll use for the next examples. Inside IndexByConf there&#39;s another OOBTree in which the keys are the conf ID&#39;s. For every conf there&#39;s another OOBTree which has a counter to provide ID&#39;s for the conferences and, finally!, a OOTreeSet to store the chatrooms. So if we want to access the OOTreeSet with the list of the chatrooms for a given conf, we should do<b> </b>root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;]<br>

<br>That said, I&#39;m having some problems when removing a chat room from the OOTreeSet. Sometimes (and this is weird, sometimes I may get the error, some others not) I get a KeyError exception when I try to remove the chat room. This is exactly the line that causes the problem:<br>

<b><br>root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;].remove(chatroom)</b><br><br>What is the problem? Basically, the chat room IS in the OOTreeSet. If you list the objects in the set you will see that the memory address of the chat room i&#39;m trying to delete is contained in the set, but the operator in won&#39;t work. Neither won&#39;t the method has_key()<br>

However, if you use the keys() method it will work, and if you use the operator in with a list of the OOTreeSet it will work also. Take a look at what I got from the interpreter:<br><br><b><br>&gt;&gt;chatroom</b><br>
&lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom object at 0x22ff646c&gt;<br><br><b>&gt;&gt;list(root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;])</b><br>
[&lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom object at 
0x22ff64ac&gt;, &lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom 
object at 0x22ff632c&gt;, 
&lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom object at 
0x22ff636c&gt;, &lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom 
object at 0x22ff63ac&gt;, 
&lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom object at 
0x22ff646c&gt;, &lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom 
object at 0x22ff63ec&gt;, 
&lt;MaKaC.plugins.InstantMessaging.handlers.Chatroom object at 
0x22ff642c&gt;]<br><br><b>&gt;&gt;chatroom in root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;]</b><br>False<br><br><b>&gt;&gt;chatroom in list(root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;]</b>)<br>True<br>

<br><b>&gt;&gt;root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;].has_key(chatroom)</b><br>
0<br><br><b>&gt;&gt;chatroom in root[&#39;indexByConf&#39;][confId][&#39;chatrooms&#39;].keys()</b><br>
True<br clear="all"><br><br>After this, I switched to a OOBTree instead of a OOTreeSet and I don&#39;t get any exception, but I&#39;d like to avoid using an OOTreeSet in this case.<br>So do you have any idea of what can be causing this problem?<br>

<br><br>Best regards,<br>César.<br clear="all"><br>-- <br>César Muñoz<br><br>CERN<br>IT-UDS-AVC-Indico<br>Bd. 513, R-042<br>Tel.: +41 22 76 77159<br>