Multiple output_file in a single process can fail when models are shared
See original GitHub issueI have 2 anaconda environments in Windows 7:
- env1 has jupyter lab 0.32 and bokeh 0.12.16,
- env2 has jupyter lab 2.0.1 and bokeh 2.0.0.
In a jupyter notebook, I have 2 cells of code:
Cell 1
source1 = ColumnDataSource(fertility_df[fertility_df['Continent']=='ASI'])
p1 = figure(x_axis_label='fertility (children per woman)', y_axis_label='female literacy (% population)')
p1.circle('fertility', 'female literacy', source=source1)
source2 = ColumnDataSource(fertility_df[fertility_df['Continent']=='EUR'])
p2 = figure(x_axis_label='fertility (children per woman)', y_axis_label='female literacy (% population)')
p2.circle('fertility', 'female literacy', source=source2)
source3 = ColumnDataSource(fertility_df[fertility_df['Continent']=='AF'])
p3 = figure(x_axis_label='fertility (children per woman)', y_axis_label='female literacy (% population)')
p3.circle('fertility', 'female literacy', source=source3)
source4 = ColumnDataSource(fertility_df[fertility_df['Continent']=='LAT'])
p4 = figure(x_axis_label='fertility (children per woman)', y_axis_label='female literacy (% population)')
p4.circle('fertility', 'female literacy', source=source4)
row1 = [p1, p2]
row2 = [p3, p4]
layout = gridplot([row1, row2])
output_file('bokeh.html')
show(layout)
Cell 2
tab1 = Panel(child=p1, title='Latin America')
tab2 = Panel(child=p2, title='Africa')
tab3 = Panel(child=p3, title='Asia')
tab4 = Panel(child=p4, title='Europe')
layout = Tabs(tabs=[tab1, tab2, tab3, tab4])
output_file('bokeh.html')
show(layout)
In the env1
, I could run cell 1, cell 2, and cell 1 again without any problem.
However, in env2
, after executing cell 1, then trying to run cell 2, I got an error :
RuntimeError: Models must be owned by only a single document, WheelZoomTool(id='1130', ...) is already in a doc
My questions are:
- Is it a bug in bokeh 2.0.0?
- What does it mean by Models in the error message?
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
How to set multiple file entry and output in project with webpack?
The sane way is to use multi-compiler. One input file one config object one output file. From this answer. Share.
Read more >Use Batch Transform - Amazon SageMaker
When your dataset has multiple input files, a transform job continues to process input files even if it fails to process one. The...
Read more >Snakefiles and Rules — Snakemake 7.19.1 documentation
Snakefiles and Rules¶. A Snakemake workflow defines a data analysis in terms of rules that are specified in the Snakefile. Most commonly, rules...
Read more >Troubleshooting the ParallelRunStep - Azure Machine Learning
The -1 part indicates ignoring all failures during processing. output_action : One of the following values indicates how the output will be ...
Read more >Troubleshoot Dataflow errors - Google Cloud
This error occurs if your job's graph size exceeds 10 MB. Certain conditions in your pipeline can cause the job graph to exceed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, @bryevdv. I can understand what you are coming from. Appreciated your help. Cheers.
As an aside, we have our own live tutorial notebooks that can be used instead:
https://mybinder.org/v2/gh/bokeh/bokeh-notebooks/master?filepath=tutorial%2F00 - Introduction and Setup.ipynb
I think the actual fix here is to try and get whoever made this other tutorial to update it to be better and more idiomatic. Can you specify where this tutorial is, or who made it?