I was trying to implement my own nav toolbar, and everything works great except an exception that gets thrown intermittently when in zoom rubberbanding operation, from this bit of code in CallbackRegistry (cbook.py):
def process(self, s, *args, **kwargs):
process signal s. All of the functions registered to receive
callbacks on s will be called with *args and **kwargs
for cid, proxy in self.callbacks[s].items():
Clean out dead references
if proxy.inst is not None and proxy.inst() is None:
del self.callbacks[s][cid] #<----------- the cid key doesn’t exist.
is it OK to eat and ignore this exception? Everything seems to work just fine.
I know that this is probably one of those weak-reference callbacks getting dropped, but I don’t make any connections to ‘button_release_event’ anywhere in my code, and that’s what ‘s’ is in the above code when the dictionary key is missing. In other areas of my code where I am making connections, I did make sure that I’m saving a reference to them myself.