holoviews: Interactive Graphs Don't Update in VSCode

ALL (relevant) software version info

Python packages

holoviews: 1.12.7 jupyter: 1.0.0
jupyter_client: 7.3.4
jupyter_console: 6.6.3
jupyter_core: 5.3.0
jupyter_server: 1.23.6
jupyterlab_pygments: 0.2.2
jupyterlab_widgets: 3.0.7
numpy: 1.20.2

Visual Studio Code related info

Version: 1.78.1 (user setup) Commit: 6a995c4f4cc2ced6e3237749973982e751cb0bf9 Date: 2023-05-04T09:48:08.683Z Electron: 22.5.1 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22000 Sandboxed: Yes

Description of expected behavior and the observed behavior

Based on the documentation, when the value of the slider changes, the graph’s output should also change. However, in VSCode, this is not the case. I have observed this with multiple graphs and the issue does not seem limited to sliders. Any help would be greatly appreciated!

Complete, minimal, self-contained example code that reproduces the issue

import numpy as np
import holoviews as hv

## Set extension
hv.extension('bokeh')

## Create a sine curve, same code from the DynamicMap documentation
def sine_curve(phase, freq):
    xvals = [0.1* i for i in range(100)]
    return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals]))
dmap = hv.DynamicMap(sine_curve, kdims=['phase', 'frequency'])
dmap.redim.range(phase=(0.5,1), frequency=(0.5,1.25))

Screenshots or screencasts of the bug in action

image image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

When I change the kernel the error goes away. I was using my old environment with pinned version numbers. Let me try with a fresh environment.

When I use a new environment it fixes the issue! Thank you so much for your help, that’s great that it works. Now I will just have to stop using the old environment for our data preprocessing.

You are using a really old version of Holoviews (and, by the looks of it, also other packages). Try updating to the latest versions from a fresh environment.

(The latest holoviews version is 1.16.2)