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

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

Open
1 task done
kcpevey opened this issue May 21, 2024 · 2 comments
Open
1 task done

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

kcpevey opened this issue May 21, 2024 · 2 comments

Comments

@kcpevey
Copy link
Contributor

kcpevey commented May 21, 2024

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.

@kcpevey kcpevey changed the title [DOC] - Panel apps are no longer visible in JupyterLab [DOC] - Panel apps occasionally no longer visible in JupyterLab May 22, 2024
@kcpevey
Copy link
Contributor Author

kcpevey commented May 23, 2024

This happened to me again today. Here is what I tried:

  • browser refresh alone - didn't fix
  • browser refresh and kernel restart clear all - didn't fix
  • kernel restart clear all, save, and then browser refresh - fixed it

@kcpevey
Copy link
Contributor Author

kcpevey commented May 23, 2024

This happened again this afternoon. A few more data points:

  • browser refresh and save - didn't fix
  • browser refresh and kernel restart clear all AND save - didn't fix
  • kernel restart clear all and then browser refresh - fixed it (no save)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 📬
Development

No branches or pull requests

1 participant