Open jijasmx opened 3 years ago
I'm getting the same stacktrace. Is there anything we can do to help pinpoint the problem?
@kaharlichenko thanks for helping to pinpoint the issue. In the original report the python/conda/pip versions are lacking, making it nearly impossible to debug. Especially the ipywidgets version. Does updating help?
Here's the minimal piece of code that reproduces the bug for me:
import pandas as pd
from pandas_profiling import ProfileReport
df = pd.DataFrame(
data=[
["foo", 1],
["bar", 2],
],
columns=["a", "b"],
)
profile = ProfileReport(df, title="Bug Report")
profile.to_widgets()
I'm running Python 3.8.10. The package versions are below.
The project dependencies and the lock files: poetry.lock pyproject.toml
I hope it helps.
I also have the same problem and I can reproduce with the dummy example above.
Installed with poetry :
name : ipywidgets
version : 7.6.5
name : pandas-profiling
version : 3.1.0
Thanks in advance for any help
Could you try if the develop branch solves this issue (pip install git+https://github.com/pandas-profiling/pandas-profiling.git@develop
- which is v3.1.1)?
I can confirm that I can't reproduce the bug with the version installed from the develop
branch. I tried both the minimal code above and the real profiling project that I have. Thank you for the fix.
I have the same problem as this, and I fixed it by the steps below.
uninstall pandas profiling update Anaconda update Notebook !pip install https://github.com/pandas-profiling/pandas-profiling/archive/refs/tags/v3.0.0.zip
let me know if it works for you
Missing functionality
1 profile.to_widgets() ~\anaconda3\lib\site-packages\pandas_profiling\profile_report.py in to_widgets(self) 412 from IPython.core.display import display 413 --> 414 display(self.widgets) 415 416 def _repr_html_(self) -> None: ~\anaconda3\lib\site-packages\pandas_profiling\profile_report.py in widgets(self) 195 def widgets(self) -> Renderable: 196 if self._widgets is None: --> 197 self._widgets = self._render_widgets() 198 return self._widgets 199 ~\anaconda3\lib\site-packages\pandas_profiling\profile_report.py in _render_widgets(self) 321 leave=False, 322 ) as pbar: --> 323 widgets = WidgetReport(copy.deepcopy(report)).render() 324 pbar.update() 325 return widgets ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\root.py in render(self, **kwargs) 7 def render(self, **kwargs) -> widgets.VBox: 8 return widgets.VBox( ----> 9 [self.content["body"].render(), self.content["footer"].render()] 10 ) ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in render(self) 104 widget = get_named_list(self.content["items"]) 105 elif self.sequence_type in ["tabs", "sections", "select"]: --> 106 widget = get_tabs(self.content["items"]) 107 elif self.sequence_type == "accordion": 108 widget = get_accordion(self.content["items"]) ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in get_tabs(items) 18 titles = [] 19 for item in items: ---> 20 children.append(item.render()) 21 titles.append(get_name(item)) 22 ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in render(self) 106 widget = get_tabs(self.content["items"]) 107 elif self.sequence_type == "accordion": --> 108 widget = get_accordion(self.content["items"]) 109 elif self.sequence_type == "grid": 110 widget = get_row(self.content["items"]) ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in get_accordion(items) 87 titles = [] 88 for item in items: ---> 89 children.append(item.render()) 90 titles.append(get_name(item)) 91 ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\variable.py in render(self) 8 items = [self.content["top"].render()] 9 if self.content["bottom"] is not None: ---> 10 items.append(self.content["bottom"].render()) 11 12 return widgets.VBox(items) ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\collapse.py in render(self) 12 13 toggle = self.content["button"].render() ---> 14 item = self.content["item"].render() 15 16 if collapse == "correlation": ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in render(self) 104 widget = get_named_list(self.content["items"]) 105 elif self.sequence_type in ["tabs", "sections", "select"]: --> 106 widget = get_tabs(self.content["items"]) 107 elif self.sequence_type == "accordion": 108 widget = get_accordion(self.content["items"]) ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in get_tabs(items) 18 titles = [] 19 for item in items: ---> 20 children.append(item.render()) 21 titles.append(get_name(item)) 22 ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in render(self) 108 widget = get_accordion(self.content["items"]) 109 elif self.sequence_type == "grid": --> 110 widget = get_row(self.content["items"]) 111 elif self.sequence_type == "batch_grid": 112 widget = get_batch_grid( ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in get_row(items) 55 raise ValueError("Layout undefined for this number of columns") 56 ---> 57 return widgets.GridBox([item.render() for item in items], layout=layout) 58 59 ~\anaconda3\lib\site-packages\pandas_profiling\report\presentation\flavours\widget\container.py in