question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hvplot not working in vs code

See original GitHub issue

I’ve just created a new virtual environment (.venv, python 3.10) with hvplot 0.8.2.

And it fails when I try to use it in the VS Code Interactive Jupyter window.

image

import hvplot.pandas
Traceback (most recent call last):
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3433, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-d0834c846347>", line 1, in <module>
    import hvplot.pandas
  File "/home/jovyan/repos/private/hvplot/hvplot/pandas.py", line 25, in <module>
    patch()
  File "/home/jovyan/repos/private/hvplot/hvplot/pandas.py", line 23, in patch
    post_patch(extension, logo)
  File "/home/jovyan/repos/private/hvplot/hvplot/__init__.py", line 166, in post_patch
    hvplot_extension(extension, logo=logo)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/pyviz_comms/__init__.py", line 64, in __new__
    return param.ParameterizedFunction.__new__(cls, *args, **kwargs)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/param/parameterized.py", line 3654, in __new__
    return inst.__call__(*args,**params)
  File "/home/jovyan/repos/private/hvplot/hvplot/utilities.py", line 45, in __call__
    super().__call__(*args, **params)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/holoviews/ipython/__init__.py", line 149, in __call__
    ip.run_line_magic('config', 'IPCompleter.use_jedi = False')
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 2364, in run_line_magic
    result = fn(*args, **kwargs)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/magics/config.py", line 163, in config
    configurables = sorted(set([ c for c in self.shell.configurables
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/magics/config.py", line 164, in <listcomp>
    if c.__class__.class_traits(config=True)
AttributeError: type object 'CommManager' has no attribute 'class_traits'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 2052, in showtraceback
    stb = self.InteractiveTB.structured_traceback(
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/ultratb.py", line 1112, in structured_traceback
    return FormattedTB.structured_traceback(
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/ultratb.py", line 1006, in structured_traceback
    return VerboseTB.structured_traceback(
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/ultratb.py", line 859, in structured_traceback
    formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/ultratb.py", line 812, in format_exception_as_a_whole
    frames.append(self.format_record(r))
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/IPython/core/ultratb.py", line 730, in format_record
    result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/core.py", line 720, in lines
    pieces = self.included_pieces
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/core.py", line 663, in included_pieces
    scope_pieces = self.scope_pieces
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/core.py", line 603, in scope_pieces
    for piece in self.source.pieces
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/core.py", line 101, in pieces
    return list(self._clean_pieces())
  File "/home/jovyan/repos/private/hvplot/.venv/lib/python3.10/site-packages/stack_data/core.py", line 125, in _clean_pieces
    raise AssertionError("Pieces mismatches: %s" % mismatches)
AssertionError: Pieces mismatches: [{680, 681}, {696, 695}, {708, 709}, {714, 715}]

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Hoxbrocommented, Nov 25, 2022

The package has been yanked from pypi and marked as broken on conda-forge. A new release of ipykernel will be released at the start of next week. So I don’t think there is anything to do, other than wait.

1reaction
dwr-psandhucommented, Nov 26, 2022

Downgrade worked.

Try to downgrade ipykernel to 6.17.1.

see #981

Read more comments on GitHub >

github_iconTop Results From Across the Web

hvplot widgets not working in vscode (visual studio code)
Found this solution at https://github.com/bokeh/jupyter_bokeh/issues/131 after installing jupyter_bokeh , ran the following code in the ...
Read more >
Hvplot.explorer(df) not working - HoloViz Discourse
Hi, I've tried using the hvplot.explorer() function without any luck. I've copy-pasted the code from the panel website (link Code: import io ...
Read more >
hvPlot explorer not updating - HoloViz Discourse
I am genuinely just confused there might be something mucking with it somewhere and I just don't understand how to debug it. vscode:...
Read more >
Viewing — hvPlot 0.8.2 documentation
Viewing#. hvPlot is written to work well inside a Jupyter notebook, from the interactive Python command prompt, or inside a Python batch script....
Read more >
Hv plot works with jupyter but when I copy to pycharm nothing ...
it works well in the Jupyter. but when I copy the code in pycharm it will debog ... you mentioned in my pycharm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found