lux-org / lux

Automatically visualize your pandas dataframe via a single print! 📊 💡
Apache License 2.0
5.15k stars 365 forks source link

[BUG] TypeError: super(type, obj): obj must be an instance or subtype of type #407

Closed muammar closed 3 years ago

muammar commented 3 years ago

Describe the bug

When importing lux and trying to create a .lineplot() with seaborn during a for loop, I get the TypeError shown on the title of this bug report.

To Reproduce

I am uploading a notebook that can reproduce this error. You will also find a pickle file with a DataFrame that gives me the error in the zip file:

  % md5 lux_error_reproducibility.zip                                                                                                   
MD5 (lux_error_reproducibility.zip) = e8d110587d153e58df3f1e2ec771fd43

Expected behavior

Having the line plots created without any issue.

Screenshots

Error when import lux is activated.

image

Commenting import lux, killing the kernel, and re-running the notebook:

image lux_error_reproducibility.zip

dorisjlee commented 3 years ago

Hi @muammar,

Thank you for reporting this issue and the detailed steps to reproduce the errors! It looks like when lux is imported, the groupby called by seaborn leads to some issues on the LuxDataFrame. I was not exactly able to reproduce this issue since I had trouble opening the attached molfeat.pkl file, but testing this on a synthetic dataset of similar nature, I could not see the same error. Screen Shot 2021-08-13 at 10 56 51 AM

Could you let me know which version of Lux you are using? (i.e., print(lux.__version__)) You could also try to see if upgrading to the latest version of lux-api might fix the problem:

pip install --upgrade lux-api

And optionally:

jupyter nbextension install --py luxwidget
jupyter nbextension enable --py luxwidget

Please let me know if this issue is resolved after upgrading to the latest version? Thanks again!

muammar commented 3 years ago

Hi @muammar,

Thank you for reporting this issue and the detailed steps to reproduce the errors! It looks like when lux is imported, the groupby called by seaborn leads to some issues on the LuxDataFrame. I was not exactly able to reproduce this issue since I had trouble opening the attached molfeat.pkl file, but testing this on a synthetic dataset of similar nature, I could not see the same error.

Sorry, it took me long to reply. I am uploading a CSV file with the same content as the pickle file to reproduce the issue:

molfeat.csv

Could you let me know which version of Lux you are using? (i.e., print(lux.__version__))

print(lux.__version__)
0.3.0

You could also try to see if upgrading to the latest version of lux-api might fix the problem:

pip install --upgrade lux-api

And optionally:

jupyter nbextension install --py luxwidget
jupyter nbextension enable --py luxwidget

Please let me know if this issue is resolved after upgrading to the latest version? Thanks again!

I upgraded to 0.3.2, and the issue is not there anymore! Thanks!

I will proceed to close the report.

dorisjlee commented 3 years ago

That sounds great, thanks for letting us know @muammar!