TreeItemId unhashable

13 views
Skip to first unread message

braide...@gmail.com

unread,
May 17, 2017, 8:45:27 AM5/17/17
to wxPython-users
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
Reply all
Reply to author
Forward
0 new messages