Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

25 Mar 2024

0

kmeans.fit(x) not working? - AttributeError: 'NoneType' object has no attribute 'split'. - try this

I had trouble with the line ... kmeans.fit(x)

Threw a long error message ending in ... AttributeError: 'NoneType' object has no attribute 'split'.

I think the uninstantiated object it was trying to call was a Thread.

The solution is to update the threadpool (sounds scary but in fact very easy)

in your anaconda prompt, type ... pip install threadpoolctl==3.1.0

Don't forget to restart Jupyter when you have done it.


full explanation at this stack overflow answer

https://stackoverflow.com/questions/71352354/sklearn-kmeans-is-not-working-as-i-only-get-nonetype-object-has-no-attribute





0 answers ( 0 marked as helpful)

Submit an answer