Closed PhilippeDataScienc closed 11 months ago
Hi, @PhilippeDataScienc
Could you tell me the version of your notebook or jupyterlab?
I will try to reproduce it.
Also, Could you try running the code below and tell me what the output is?
from IPython.display import display
import ipywidgets as widgets
button = widgets.Button(description="Click Me!")
output = widgets.Output()
display(button, output)
def on_button_clicked(b):
with output:
print("Button clicked.")
button.on_click(on_button_clicked)
Thanks.
your code snippet works for me ! I have a click me button displayed!
My jupyterlab version is: 4.0.9
Problem seems to be solved with your code snippet, maybe I had an import missing ?
I guessed that it was your first time using the pygwalker process, and I successfully reproduced the bug.
Since you haven't installed ipywidgets before, when the Jupyter kernel was already running, installing pygwalker (which relies on ipywidgets for rendering) caused the notebook to not establish communication with ipywidgets, resulting in the unsuccessful rendering of pygwalker's UI.
However, when you close the kernel and refresh the page, JupyterLab should establish communication with ipywidgets again (or for some other reason, JupyterLab establishes communication with ipywidgets), so pygwalker could be re-rendered.
This bug will not occur again when you use pygwalker in the future.
Describe the bug When trying to load a df with pygwalker inside Jupyter Notebook to display the interactive UI, a HTML message is displayed instead of the interactive UI.
import pandas as pd
import pygwalker as pyg
df = pd.read_csv("toto.csv", sep=',')
gwalker = pyg.walk(df)
To Reproduce Steps to reproduce the behavior:
gwalker = pyg.walk(df)
Expected behavior A graphical and interactive UI shows up !
Screenshots
Versions
Additional context Add any other context about the problem here.