Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make version mismatches visible to users #128

Open
jiagengliu opened this issue Mar 24, 2021 · 10 comments
Open

Make version mismatches visible to users #128

jiagengliu opened this issue Mar 24, 2021 · 10 comments

Comments

@jiagengliu
Copy link

jiagengliu commented Mar 24, 2021

Hi! Thank you so much for providing the brilliant package.

Matplotlib inline works in my Jupyterlab notebook, but not Bokeh (or Holoviews). See the screenshot below. I am able to get the "BokehJS 2.2.3 successfully loaded" message when I re-run the code cell to import Bokeh, but there is still no figure output. I am using JupyterLab 3.0.12, Bokeh 2.3.0, Python 3.8.5 on Ubuntu 20.04. There is no particular output in Jupyter's command line, either. I wonder what might be the reason? Thank you!

@bryevdv
Copy link
Member

bryevdv commented Mar 24, 2021

  • Does it work without MPL ?
  • Does it work without INLINE?
  • Are there any errors in the browsers JS console?

cc @philippjfr @mattpap

@bryevdv
Copy link
Member

bryevdv commented Mar 24, 2021

@jiagengliu I just noticed this:

"BokehJS 2.2.3 successfully loaded"

If you see that then your notebook environment is definitely not using Bokeh 2.3 you should first make sure that you have the Bokeh 2.3 installed in the same env as the jupyterlab. E.g. you can check bokeh.__version__

@jiagengliu
Copy link
Author

@jiagengliu I just noticed this:

"BokehJS 2.2.3 successfully loaded"

If you see that then your notebook environment is definitely not using Bokeh 2.3 you should first make sure that you have the Bokeh 2.3 installed in the same env as the jupyterlab. E.g. you can check bokeh.__version__

Thank you! I checked and weirdly enough, it says Bokeh 2.3.0. See below. I only use pip to install packages and I don't have conda or other virtualenvs.

image

@jiagengliu
Copy link
Author

I checked the browser JS and see the following error messages.

[bokeh] JS/Python version mismatch
from_json @ VM827:287
VM827:287 [bokeh] Library versions: JS (2.2.3) / Python (2.3.0)
from_json @ VM827:287

Uncaught Error: Model 'AllLabels' does not exist. This could be due to a widget or a custom model not being registered before first usage.
    at Object.s.Models (<anonymous>:288:204)
    at Function._instantiate_object (<anonymous>:287:4891)
    at Function._instantiate_references_json (<anonymous>:287:5050)
    at Function.from_json (<anonymous>:287:8363)
    at Object.t.embed_items_notebook (<anonymous>:700:2975)
    at embed_document (<anonymous>:6:20)
    at <anonymous>:10:5
    at <anonymous>:26:3
    at a.renderModel (809.9e119e998e669aa9de3a.js?v=9e119e998e669aa9de3a:1)
translate.js:1112 Uncaught (in promise) Error: getTranslators: detection is already running
    at Zotero.Translate.Web.<anonymous> (translate.js:1112)
    at Zotero.Translate.Web.getTranslators (promise.js:34)
    at Object.init (inject.js:104)
    at Object.historyChanged (inject.js:675)
    at messageListener (messaging_inject.js:122)
    at messaging_inject.js:132

@bryevdv
Copy link
Member

bryevdv commented Mar 24, 2021

There seems to be something really messed up in this environment. Can you try installing all of the following in a clean env?

  • jupyter lab 3.x
  • bokeh 2.3
  • jupyter_bokeh 3.0

@philippjfr
Copy link
Contributor

I think the old bokeh.js is sticking around in the notebook. Can you try clearing the notebook, saving, then reload the browser tab and try again.

@jiagengliu
Copy link
Author

I think the old bokeh.js is sticking around in the notebook. Can you try clearing the notebook, saving, then reload the browser tab and try again.

Thank you! I restarted the browser and it worked. I never thought that the problem is because I seldom close the browser.

Thanks again for the rapid response. I will close it now.

@philippjfr
Copy link
Contributor

We should still try to figure out a fix here, a new version of bokeh should override the old one. The problem is particularly bad in Jupyterlab where an old version of bokeh in one tab may override the newer version in another if it is loaded first.

@bryevdv
Copy link
Member

bryevdv commented Mar 24, 2021

I would be satisfied to simply make the error message about the mismatch visible within the notebook. That ought to give users something concrete to search or, or we could even suggest a course of action there.

@jiagengliu
Copy link
Author

I think the old bokeh.js is sticking around in the notebook. Can you try clearing the notebook, saving, then reload the browser tab and try again.

I encounter the problem again today. The reason seems to be that sometimes I use Windows WSL to ssh to a server and use Jupyter and sometimes use Jupyter on my local WSL. My local machine uses the 2.2.3 version and the server uses the 3.0.0 version, so the browser probably memorizes it and does not switch? I upgrade the local version to 3.0.0 now, but I think it might be useful info.

Thanks again!

@jiagengliu jiagengliu reopened this Mar 31, 2021
@bryevdv bryevdv changed the title Empty output in Jupyterlab Make version mismatches visible to users Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants