I\'m trying to do the first exercise on scikit-learn, but even when I run their solution code (shown below) I get the error in the code block immediately following. Does any
If you read the traceback message it means that the variable file
in the expression file.write(warnings.formatwarning(message, category, filename, ...)
is set to None
instead of the expected channel (for instance the standard output of the program or a buffer in the user interface).
This means that this is probably a bug in IDLE. If you google the error message you will get:
http://bugs.python.org/issue18030
which in turn points to:
http://bugs.python.org/issue13582
So this bug is indeed not related to scikit-learn. I would suggest you to:
either launch IDLE from the cmd
console by typing python -m idlelib.idle
or use a different Python IDE / environment.