Hv.extension('bokeh') not working

Hi, I am trying to plot a graph using holoviews but the bokeh extension is throwing me an error -

Code -

import holoviews as hv
hv.extension('bokeh')

Error -

WARNING:param.notebook_extension: Holoviews bokeh extension could not be imported, it raised the following exception: ValueError('ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x0000019DCD5443F0>.')
Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\interactiveshell.py", line 3550, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "C:\Users\nikhil.jain\AppData\Local\Temp\ipykernel_4136\3674089905.py", line 2, in <module>
    hv.extension('bokeh')
  File "C:\ProgramData\Anaconda3\lib\site-packages\param\parameterized.py", line 3631, in __new__
    return inst.__call__(*args,**params)
  File "C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\__init__.py", line 116, in __call__
    super().__call__(*args, **params)
  File "C:\ProgramData\Anaconda3\lib\site-packages\holoviews\util\__init__.py", line 702, in __call__
    raise ImportError('None of the backends could be imported')
ImportError: None of the backends could be imported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\interactiveshell.py", line 2144, in showtraceback
    stb = self.InteractiveTB.structured_traceback(
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\ultratb.py", line 1435, in structured_traceback
    return FormattedTB.structured_traceback(
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\ultratb.py", line 1326, in structured_traceback
    return VerboseTB.structured_traceback(
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\ultratb.py", line 1173, in structured_traceback
    formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\ultratb.py", line 1088, in format_exception_as_a_whole
    frames.append(self.format_record(record))
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\ultratb.py", line 970, in format_record
    frame_info.lines, Colors, self.has_colors, lvals
  File "C:\Users\nikhil.jain\AppData\Roaming\Python\Python39\site-packages\IPython\core\ultratb.py", line 792, in lines
    return self._sd.lines
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\core.py", line 698, in lines
    pieces = self.included_pieces
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\core.py", line 645, in included_pieces
    scope_pieces = self.scope_pieces
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\core.py", line 585, in scope_pieces
    for piece in self.source.pieces
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\core.py", line 90, in pieces
    return list(self._clean_pieces())
  File "C:\ProgramData\Anaconda3\lib\site-packages\stack_data\core.py", line 114, in _clean_pieces
    raise AssertionError("Pieces mismatches: %s" % mismatches)
AssertionError: Pieces mismatches: [{660, 661}, {675, 676}, {688, 689}, {694, 695}]

Version Details -

Can we help me with the error.

1 Like

Hi @nikhiljain20

Welcome to the community.

Try reporting this as a bug on Github.

Can you please report your version of param , ipython and stack-data?