Type Error in Python Code

Hi! I keep running into this type error code:

sns.lmplot(x=‘BodyweightKg’,
y=‘BestDeadliftKg’,
data=PL.dropna(),
hue=‘Equipment’,
markers=‘x’,
size=7,
aspect=2)
plt.title(‘Best Deadlift by Equipment Used’,fontsize=20)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
plt.ylabel(‘Best3DeadliftKg’,fontsize=15)
plt.xlabel(‘Body3weightKg’,fontsize=15)
plt.show()
print(‘Equipment Used by Lifters:\n’)
print(df[‘Equipment’].dropna().value_counts())

This is the output:


TypeError Traceback (most recent call last)
Input In [17], in <cell line: 1>()
---->sns.lmplot(x=‘BodyweightKg’,
y=‘BestDeadliftKg’,
data=PL.dropna(),
hue=‘Equipment’,
markers=‘x’,
size=7,
aspect=2)
plt.title(‘Best Deadlift by Equipment Used’,fontsize=20)
9plt.xticks(fontsize=15)

TypeError: lmplot() got an unexpected keyword argument ‘size’

List item

This error doesn’t seem to be related to PyTorch but seaborn.
Based on the docs the size argument is indeed invalid and you would need to remove it.

1 Like

Thank you so much!!!