Skip to content

Commit

Permalink
Ensure backend is loaded before using display (#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 23, 2019
1 parent 577449b commit 8bf4b69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion holoviews/ipython/display_hooks.py
Expand Up @@ -15,7 +15,7 @@
AbbreviatedException)
from ..core import (
ViewableElement, HoloMap, AdjointLayout, NdLayout, GridSpace,
Layout, CompositeOverlay, DynamicMap
Layout, CompositeOverlay, DynamicMap, Dimensioned
)
from ..core.traversal import unique_dimkeys
from ..core.io import FileArchive
Expand Down Expand Up @@ -233,6 +233,11 @@ def display(obj, raw_output=False, **kwargs):
using the IPython display function. If raw is enabled
the raw HTML is returned instead of displaying it directly.
"""
if not Store.loaded_backends() and isinstance(obj, Dimensioned):
raise RuntimeError('To use display on a HoloViews object ensure '
'a backend is loaded using the holoviews '
'extension.')

raw = True
if isinstance(obj, GridSpace):
with option_state(obj):
Expand Down

0 comments on commit 8bf4b69

Please sign in to comment.