I got this error when running python from command line on Windows 10:
C:\\Users\\windows> python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:3
As user metatoaster commented, the python history file contains bytes that cannot be decoded by your system's default encoding and may be deleted. If the file contains commands that you want to keep or review you can take a backup first and try reviewing its contents in a text editor.
You have a history file that contain characters that cannot be decoded. Remove the history file (POSIX:
~/.python_history
, on Windows it might be%userprofile%/.python_history
) and see if that problem goes away.