Bokeh class definition for `_ModelInDocument` has either moved or been deprecated, import needs to be updated
See original GitHub issueIn Bokeh 12.5dev14 release, the class _ModelInDocument
is no longer defined in bokeh.model. This is required for datashader.bokeh_ext.InteractiveImage
. Here is the traceback:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-9d4688ff35b4> in <module>()
1 import datashader
----> 2 from datashader.bokeh_ext import InteractiveImage
/Users/schowell/data/code/datashader/datashader/bokeh_ext.py in <module>()
8 from bokeh.io import notebook_div
9 from bokeh.models import CustomJS, ColumnDataSource, Square, HoverTool, GlyphRenderer
---> 10 from bokeh.model import _ModelInDocument as add_to_document
11 from bokeh.io import _CommsHandle
12 from bokeh.util.notebook import get_comms
ImportError: cannot import name '_ModelInDocument'
There is a function definition for _ModelInDocument
in bokeh/embed.py
but it is different code. I am not sure where this got moved to but it breaks the bokeh extension for interactive datashader images. @bokeh/core was this class definition moved or deprecated?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:18 (10 by maintainers)
Top Results From Across the Web
bokeh.models.formatters — Bokeh 3.0.1 Documentation
This page is documentation for a DEVELOPMENT / PRE-RELEASE version. For the latest release, go to https://docs.bokeh.org/en/latest/ 3.0.1. latest3.0.22.4.32.3. ...
Read more >BokehDeprecationWarnings with Bokeh v1.4.0 #51 - GitHub
The latest release of the Bokeh package has deprecated the legend keyword, so the output of all plots now includes the following message:....
Read more >API Changes — Matplotlib 1.5.3 documentation
Therefore code involving it has been removed from all but the wx backend (where it partially works), and its use is deprecated. The...
Read more >Releases — HoloViews v1.15.3
9 series, many new features on the master branch have been released. Features relating to datashader support, linked selection and improvements to the...
Read more >Version 0.22.2.post1 — scikit-learn 1.2.0 documentation
birch import Birch (in practice, birch.py has been moved to _birch.py ). Note. All the tools in the public API should be documented...
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
@sbanjac you can install specific versions of packages, e.g.,
conda install bokeh=0.12.4
. You should have a look at creating conda environments. I just created a conda environment with datashader, Bokeh 0.12.4, and Jupyter, which I could use to generate bokeh/datashader plots. You would create the environment usingthen activate the environment using
This will allow you to now use datashader with bokeh.
You are right, there is no
conda-forge
package and I was running datashader 0.4.0 from the main conda channels. Sorry for the noise and thanks!