-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
FigureWidget
fails with anywidget
in v6.0.0
#5027
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
Comments
FigureWidget
fails with anywidget
in v6.0.0FigureWidget
fails with anywidget
in v6.0.0
FigureWidget
fails with anywidget
in v6.0.0FigureWidget
fails with anywidget
in v6.0.0
Could you describe the way that you installed anywidget? I was seeing this issue when I installed anywidget while JupyterLab was running without restarting it. I'm curious if restarting JupyterLab / reloading the page would help. (Still a bug, just good info for debugging) |
@marthacryan I created a fresh venv with python3.11 and run |
Thank you for the info @turbotimon! Looks like this is an issue with |
Update here: looks like there is a PR open that does fix this issue for plotly.js: plotly/plotly.js#7367. |
Plotly.js just released the 3.0.1 patch which will fix this! We'll need to update the plotly.js version in plotly.py, so I'll wait on that to close this issue. |
Hi, |
You can't upgrade? |
Upgrade or downgrade, just don't use v6.0.0, e.g.: |
@turbotimon Is this now working for you? |
With 5.24 it is, I did not try it with 6.0.1 yet.. Edit: Just tried with 6.0.1 in colab. It works but behaves different, a single Test code: # %%
!pip install -U plotly anywidget
# %%
import plotly.graph_objs as go
fig = go.FigureWidget()
fig.add_scatter(y=[2, 1, 4, 3])
fig # does not show anything!
# %%
display(fig) # but this
# %%
button = widgets.Button(description="foo")
def on_button_clicked(b):
fig.data[0].y = [1, 2, 3, 4]
button.on_click(on_button_clicked)
button # test the change |
Problem:
Since v6.0.0
FigureWidget
usesanywidget
. However, it fails with a java script error.Either, no output (no figure) is shown or this is shown:
Workaround:
Downgrading to plotly-5.24 solves the problem
Related:
Maybe somewhat related to #4996
The text was updated successfully, but these errors were encountered: