Skip to content

[DOC] - Panel apps occasionally no longer visible in JupyterLab #464

Open
@kcpevey

Description

@kcpevey

Preliminary Checks

Summary

I've had a situation happen a few times where I was working with Panel one day and I come back the next day and the app will no longer display in a jupyter notebook. This happens with no changes to the notebook, or the environment.

Looking in the java console, at the beginning of the traceback there is a statement Bokeh: BokehJS was loaded multiple times but one version failed to initialize. Then, every time you try to visualize a panel object the java console shows ERROR: Unable to run Panel code because Bokeh or Panel library is missing.

I've spent loads of time trying to figure out how it got in this state and I've gotten nowhere. The workaround I've been using for a while is to shut down my server, and open an incognito window and restart the server there. So I'm fairly certain this is a caching issue of some sort.

Today I discovered a better solution - if you shutdown ALL your open kernels, restart and clear all in the notebook, save the notebook, then REFRESH the whole browser page... it will start working again. Note - if you simple restart and clear all on just one notebook, it will not fix it.

I'm not sure why this is happening, but I've had to deal with this enough times and have spent enough time being baffled, that I think its worth an FAQ mention on how to fix.

Steps to Resolve this Issue

  1. Shutdown all kernels
  2. Restart and clear all in the notebook of interest ()
  3. Save the notebook
  4. Refresh the browser.

If this happens again, I'd first want to check if a browser refresh alone would work, then I'd add these other steps in one by one. Since I can't reproduce the error, I'm not sure what is the minimal required.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Todo 📬

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions