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

Avoid multiple extension execution #3266

Merged
merged 1 commit into from
Mar 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions panel/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,16 +542,16 @@ def __call__(self, *args, **params):
# In embedded mode the ipywidgets_bokeh model must be loaded
__import__(self._imports['ipywidgets'])

nb_load = False
nb_loaded = getattr(self, '_repeat_execution_in_cell', False)
if 'holoviews' in sys.modules:
if getattr(hv.extension, '_loaded', False):
return
with param.logging_level('ERROR'):
hv.plotting.Renderer.load_nb(config.inline)
if hasattr(hv.plotting.Renderer, '_render_with_panel'):
nb_load = True
nb_loaded = True

if not nb_load and hasattr(ip, 'kernel'):
if not nb_loaded and hasattr(ip, 'kernel'):
load_notebook(config.inline)
panel_extension._loaded = True

Expand Down