nebari-dev / nebari-dev/nebari-docs

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

Open
#464 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: documentation 📖
Dominant language
No language data
Stars
21
Forks
40
Avg merge
19h 50m
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's reported recovery steps: shut down all kernels, restart and clear the notebook, save it, and refresh the browser. Check whether a refresh alone is sufficient, then identify the minimum reliable sequence before documenting it as an FAQ. Done means the troubleshooting guidance clearly explains how to restore Panel apps in JupyterLab.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.