diff --git a/bokeh/embed/util.py b/bokeh/embed/util.py
index 36333a39c..e0c610f03 100644
@@ -113,7 +113,7 @@ def OutputDocumentFor(objs, apply_theme=None, always_new=False):
def finish(): pass
- docs = set(x.document for x in objs)
+ docs = _compute_current_docs(objs)
# handle a single shared document, or missing document
if len(docs) == 1:
@@ -317,6 +317,14 @@ be used. For more information on building and running Bokeh applications, see:
+ docs = set()
+ for obj in objs:
+ for ref in obj.references():
+ return docs
doc = Document()
for m in models:
I will submit a PR once I have time to figure out some tests.
It pains me to bring up these export_png-related issues... but here I go again. This time it is an error that shows up when using
In 0.13.0, the following works just fine:
...but in 1.0.0, it throws the following error for the line
RuntimeError: Models must be owned by only a single document, HelpTool(id='1026', ...) is already in a doc
show(doc_layout)works, as well (but that is not really a workaround).
showworks, too. This could be a workaround in most use cases, but is quite inconvenient in mine.
Many thanks for the 1.0 release, anyway. I read about it in the change log, and it really feels like the export function is now faster for multiple exports!
The text was updated successfully, but these errors were encountered: