Do not reset removed handles
@@ -111,6 +111,8 @@ class MessageCallback(object):
if self.handle_ids:
handles = self._init_plot_handles()
for handle_name in self.models:
+ if not (handle_name in handles):
+ continue
handle = handles[handle_name]
cb_hash = (id(handle), id(type(self)))
self._callbacks.pop(cb_hash, None)
