cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Do Databricks ipywidgets support plotly FigureWidget?

Cosimo_F_
Contributor

Hello,

I'm trying to use plotly's FigureWidget but getting this error:

"Error displaying widget: Cannot read properties of undefined (reading 'buffer')"

This is the code

from plotly import graph_objects as go

from plotly import express as px

from plotly import data as pld

df = pld.iris()

fig = px.bar(df, x='sepal_length', y='sepal_width')

fig_widget = go.FigureWidget(fig)

display(fig_widget)

DBR 11.2

Thank you,

Cosimo.

1 ACCEPTED SOLUTION

Accepted Solutions

Cosimo_F_
Contributor

Thank you for the suggestion! 10.4 does not seem to support ipywidgets but I tried with 11.0 and it works!

View solution in original post

4 REPLIES 4

Debayan
Esteemed Contributor III

Could you please confirm if you have gone through the requirements here: https://docs.databricks.com/notebooks/ipywidgets.html#requirements

We haven't got any such requests for the same, I can check on the compatibility.

Cosimo_F_
Contributor

Thank you Debayan,

I believe I have. Thank you for checking on the support. Also would be helpful to confirm if you can replicate the error.

Best,

Cosimo.

Hi @Cosimo Fellineโ€‹ , Did you check with a lower DBR version?

I have checked with DBR 10.4, and it's executed perfectly. Please check with DBR 10.4.

image.pngAnd yes, it reflected a similar error with DBR 11.2.

Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.

Cosimo_F_
Contributor

Thank you for the suggestion! 10.4 does not seem to support ipywidgets but I tried with 11.0 and it works!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group