C2W2 error with seaborn regplot

I’m doing the programming assignment for week 2 and running into an error in the second code cell in section " Feature Correlation" where I get the following:

TypeError                                 Traceback (most recent call last)
Input In [8], in <cell line: 5>()
      6     other_indices = feature_names.index(other_feature)
      7     with sns.axes_style("darkgrid"):
----> 8         sns.regplot(
      9             classification_changes[:, :, target_indices].reshape(-1), 
     10             classification_changes[:, :, other_indices].reshape(-1), 
     11             fit_reg=True,
     12             truncate=True,
     13             ci=99,
     14             x_ci=99,
     15             x_bins=len(classification_history),
     16             label=other_feature
     17         )
     18 plt.xlabel(target_feature)
     19 plt.ylabel("Other Feature")

TypeError: regplot() takes from 0 to 1 positional arguments but 2 positional arguments (and 6 keyword-only arguments) were given

The previous cells run fine for me but this one fails to plot. Am I missing to modify something in the previous cells or are there wrong parameters passed to the function?
Thank you

Hi Maevil!
Welcome to the community :dizzy:.
Well, I was wondering why this error would occur as I remembered running this cell without any errors for the same piece of code ( These lines are there by default (helper code)- this is not the “user-editable” section of the notebook ). And it turned out to be a version issue.

Works fine for previous versions :

And throws errors for versions 0.12.0 and above:

This is due to this update:

So, there is no issue from your side, don’t worry. Please proceed with the other sections of the assignment. I will report this issue to the team, thanks for letting us know.
Have a great day!

1 Like

Hello Nithin,
Thank you very much for looking into it!
I could submit and everything was fine.
Have a great day!

1 Like

Hello Maevik!
I’m happy to inform you that the issue has been resolved. You can try running that cell now, it will work fine.
Have a great day.

1 Like

Just tried, it works! Thank you very much for looking into it

1 Like