TreeItemId unhashable

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

TreeItemId unhashable

braidedlogix
With the following:

    def _label_updated(self, object, name, label):
        """  Handles the label of an object being changed.
        """
        nids = {}
        for name2, nid in self._map[id(object)]:
            if nid not in nids: #unhashable type error here
                nids[nid] = None
                node = self._get_node_data(nid)[1]
                self._tree.SetItemText(nid, node.get_label(object))
                self._update_icon_for_nid(nid)

I get an exception "TypeError: unhashable type: 'TreeItemId' "

I don't know if this related to http://trac.wxwidgets.org/ticket/4796, but is there some better way to do this in the code that gets rid of the exception?

Cheers,
Eric

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...