---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-6-a6f8d12c6bbd> in <module>
4 vm.add_plot(p2)
5 m = vm.plot()
----> 6 show(m)
/usr/local/lib/python3.6/dist-packages/bokeh/io/showing.py in show(obj, browser, new, notebook_handle, notebook_url, **kw)
137 return run_notebook_hook(state.notebook_type, 'app', obj, state, notebook_url, **kw)
138
--> 139 return _show_with_state(obj, state, browser, new, notebook_handle=notebook_handle)
140
141 #-----------------------------------------------------------------------------
/usr/local/lib/python3.6/dist-packages/bokeh/io/showing.py in _show_with_state(obj, state, browser, new, notebook_handle)
175
176 if state.file or not shown:
--> 177 _show_file_with_state(obj, state, new, controller)
178
179 return comms_handle
/usr/local/lib/python3.6/dist-packages/bokeh/io/showing.py in _show_file_with_state(obj, state, new, controller)
158
159 '''
--> 160 filename = save(obj, state=state)
161 controller.open("file://" + filename, new=NEW_PARAM[new])
162
/usr/local/lib/python3.6/dist-packages/bokeh/io/saving.py in save(obj, filename, resources, title, template, state, **kwargs)
83
84 filename, resources, title = _get_save_args(state, filename, resources, title)
---> 85 _save_helper(obj, filename, resources, title, template)
86 return abspath(filename)
87
/usr/local/lib/python3.6/dist-packages/bokeh/io/saving.py in _save_helper(obj, filename, resources, title, template)
145 '''
146 from ..embed import file_html
--> 147 html = file_html(obj, resources, title=title, template=template)
148
149 with io.open(filename, mode="w", encoding="utf-8") as f:
/usr/local/lib/python3.6/dist-packages/bokeh/embed/standalone.py in file_html(models, resources, title, template, template_variables, theme, suppress_callback_warning, _always_new)
301 models_seq = models
302
--> 303 with OutputDocumentFor(models_seq, apply_theme=theme, always_new=_always_new) as doc:
304 (docs_json, render_items) = standalone_docs_json_and_render_items(models_seq, suppress_callback_warning=suppress_callback_warning)
305 title = _title_from_models(models_seq, title)
/usr/lib/python3.6/contextlib.py in __enter__(self)
79 def __enter__(self):
80 try:
---> 81 return next(self.gen)
82 except StopIteration:
83 raise RuntimeError("generator didn't yield") from None
/usr/local/lib/python3.6/dist-packages/bokeh/embed/util.py in OutputDocumentFor(objs, apply_theme, always_new)
132 doc = Document()
133 for model in objs:
--> 134 doc.add_root(model)
135
136 # handle a single shared document
/usr/local/lib/python3.6/dist-packages/bokeh/document/document.py in add_root(self, model, setter)
317 self._roots.append(model)
318 finally:
--> 319 self._pop_all_models_freeze()
320 self._trigger_on_change(RootAddedEvent(self, model, setter))
321
/usr/local/lib/python3.6/dist-packages/bokeh/document/document.py in _pop_all_models_freeze(self)
1054 self._all_models_freeze_count -= 1
1055 if self._all_models_freeze_count == 0:
-> 1056 self._recompute_all_models()
1057
1058 def _recompute_all_models(self):
/usr/local/lib/python3.6/dist-packages/bokeh/document/document.py in _recompute_all_models(self)
1077 d._detach_document()
1078 for a in to_attach:
-> 1079 a._attach_document(self)
1080 self._all_models = recomputed
1081 self._all_models_by_name = recomputed_by_name
/usr/local/lib/python3.6/dist-packages/bokeh/model.py in _attach_document(self, doc)
669 '''
670 if self._document is not None and self._document is not doc:
--> 671 raise RuntimeError("Models must be owned by only a single document, %r is already in a doc" % (self))
672 doc.theme.apply_to_model(self)
673 self._document = doc
RuntimeError: Models must be owned by only a single document, BoxZoomTool(id='1020', ...) is already in a doc