Javascript Error: property Grid.axis wasn't declared

Hi,

I have just installed bokeh 2.0.2 with pip install bokeh.

When I run:

from bokeh.io import output_notebook
output_notebook()

either it takes a long time (message: Loading BokehJS), or I get BokehJS 1.2.0 successfully loaded., but from my understanding it should load a more recent version

If I run a simple visualization taken from an example, I get:
Javascript Error: property Grid.axis wasn't declared

The version is 2.0.2 according to

import bokeh
bokeh.__version__

Any suggestions on how I can get started with bokeh?
Thanks!!!

So it proximate issue is that you are generating content with version 2.0.2, but the notebook is loading and trying to use BokehJS version 1.2.0 to render it. However I am actually at a bit of a loss as to how this could occur. This is in the classic notebook, not JupyterLab? Are there any messages in the browser’s JavaScript console?

Can you try clearing all output cells and re-evaluating one cell at a time? It might also be good to try putting output_notebook in a cell all of its own.

I could make it work in JupyterLab! I had to do:

conda install -c bokeh jupyter_bokeh
jupyter labextension install @bokeh/jupyter_bokeh

and restart JupyterLab.

For anybody who might get into the same issue, I found these commands here: GitHub - bokeh/jupyter_bokeh: An extension for rendering Bokeh content in JupyterLab notebooks

Thanks for your quick reply!

1 Like

@sbonaretti I’m glad you were able to get things working with JupyterLab! If you have time, it would still be helpful to get the information requested about classic notebook, in case there is any improvement we can make on our end. (Lots of folks are stuck using classic notebook)

I had no problem with Jupyter notebook itself.

With JupyterLab, some weird things are happening.
I start a new kernel, I run the cell containing

from bokeh.io import output_notebook

and then I have to run the cell containing

output_notebook()

2 or 3 times before I get BokehJS 2.0.2 successfully loaded. If I run this last cell only once, I get Loading BokehJS ..., and nothing happens. I have to run it a couple of times, and then it works. Not sure what is going on. I will let you know if I figure it out

@philipp you use JupyterLab more than me, does anything like this sound familiar?