'NoneType' cannot be called Error Triggered from Seabron.PairPlot ()

Hi There,
I was trying basic example codes from seaborn: statistical data visualization — seaborn 0.11.2 documentation (pydata.org) for the last almost two days to avoid below ‘NoneType’ object is not callable error triggered from seaborn.pairplot() or plot ()…. functions.


I have tried different ways like

  1. Creating a project and use pandas.read_csv() to load the data into dataframe.
  2. I have downloaded or cloned seaborn data repository from GitHub and used pandas.read_csv () and also seaborn.load_dataset() to load the data and plot.

Every time the execution reaches to seaborn…. Anyplot () command it gives this error.

I’m using python 3.10 environment in Visual Studio 2019.

Can you please five a clue how to get rid of it.

Many thanks

Could you please post your entire script as text.
Enclose it in triple backticks

    ```
    #Like this
    import seaborn as sns
    ...
    ```

It’s very hard to get a full picture otherwise.

Sadly, I can’t help you with your actual question, I’ve never had issues with Seaborn. From what you have, it seems that sns.replot is None, which is odd. Have you tried asking the Seaborn community for help?

On the face of it, it looks like tips could be the issue.

What output do you get if you print(type(tips))

Dear Jacob,
Many thanks for your response.
please note I have tried quite a few versions.
To avoid anything going wrong finally i cloned the seaborn github data repository into my computer.
Then used the following codes exactly copied from seaborn website.


import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_theme(style="darkgrid")

tips = sns.load_dataset("tips")
sns.relplot(x="total_bill", y="tip", data=tips);

Many thanks
Mahmud

Dear Rob,
it didn’t print anything until i clicked the arrow next to it.
It printed below.
<class ‘pandas.core.frame.DataFrame’>

Many thanks
Mahmud

No worries; it was a stab in the dark, tbh.

If I were you, I’d reach out to Michael Waskom via GitHub. The project seems to be very active, with issues being resolved relatively quickly.

I see.
I’ll check if I can reach the project owner.
Thanks