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

Jupyter notebook through VSCode Remote session not updating animations #1119

Closed
guidocioni opened this issue Jul 23, 2023 · 9 comments
Closed

Comments

@guidocioni
Copy link

I'm not sure if I'm doing something terribly wrong but I just tried to create an interactive plot with a time slider using the xarray accessor and, when moving the slider, nothing is happening and the plot does not update.

Then I went on the official guide webpage (https://hvplot.holoviz.org/user_guide/Interactive.html) and also here nothing is happening to the plots when I change sliders or dropdown state...
Aren't they supposed to update?

Also tried to change browser without success.

Pretty sure I'm missing something simple here...

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Jul 23, 2023

Hi @guidocioni

Plots with widgets on the website are not interactive as our Project does not have the resources to run a live server.

Regarding your example please share a minimum, reproducible example. Thanks.

@guidocioni
Copy link
Author

Hi @guidocioni

Plots with widgets on the website are not interactive as our Project does not have the resources to run a live server.

That makes sense

Regarding your example please share a minimum, reproducible example. Thanks.

Sure thing, but honestly there is nothing complicated going on here.
I'm just using this code

import hvplot.xarray
import xarray as xr

ds = xr.open_dataset("test.nc")
ds.smlp_anomaly.hvplot(
    groupby="time",  # adds a widget for time
    clim=(-3, 3),  # sets colormap limits
    widget_location="bottom",
)

You can download the test.nc file here: https://cdn1.meteonetwork.it/models/malawi/wnetwork_new/test.nc

In my case, if I try to interact with the widget the date and the data of the plot never changes.

@guidocioni
Copy link
Author

guidocioni commented Jul 23, 2023

Sorry, I may have an idea of what the problem is.

I'm running this code into a jupyter notebook over a remote connection in Vscode.
When running locally and remotely with a tunnel to my local browswer I was able to get the expected behaviour (animation updating).

There may be something going on in the way Vscode is rendering the widget over the remote connection...

@guidocioni
Copy link
Author

I went through this https://discourse.holoviz.org/t/problems-with-tabulator-widget-in-vs-code-jupyter-notebook/5454/12, which seems exactly my same issue, but I do have panel, jupyter_bokeh and the other requested packages up to date.

Any idea what could be the conflict when running the notebook through Vscode?

@guidocioni guidocioni changed the title No animations are updating? Jupyter notebook through VSCode Remote session not updating animations Jul 23, 2023
@philippjfr
Copy link
Member

It's quite possible that this is the same issue that was fixed here: holoviz/panel#5201

Could you make sure you have Panel >=1.2.0 and give us a breakdown of your environment?

@guidocioni
Copy link
Author

It's quite possible that this is the same issue that was fixed here: holoviz/panel#5201

Could you make sure you have Panel >=1.2.0 and give us a breakdown of your environment?

Here you go (not attaching the whole env for brevity)

# Name                    Version                   Build  Channel
hvplot                    0.8.4              pyhd8ed1ab_1    conda-forge
panel                     1.2.0              pyhd8ed1ab_0    conda-forge
jupyter_bokeh             3.0.7              pyhd8ed1ab_0    conda-forge
jupyter_client            7.3.4              pyhd8ed1ab_0    conda-forge
jupyter_core              5.3.0           py310hff52083_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.7              pyhd8ed1ab_0    conda-forge
ipykernel                 6.22.0             pyh210e3f2_0    conda-forge
python                    3.10.10         he550d4f_0_cpython    conda-forge

let me know if I can provide you with more info to debug the issue

@hoxbro
Copy link
Member

hoxbro commented Aug 8, 2023

Can you try upgrading holoviews to 1.17?

@guidocioni
Copy link
Author

Hi all, I just upgraded holoviews, hvplot, jupyter_bokeh and Panel to the latest version but the problem still persists...

@guidocioni
Copy link
Author

Wait, I just restarted the vscode server and it seems to be working now! :)
Yeee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants