I think this is caused by the fact that PyScripter 4.0.0 runs python with -X utf8 flag.
It assumes therefor that the file you are reading (I assume you are reading a file), is in utf8 encoding by default. Apparently the file you are reading contains characters in > #127 and is not compatible with utf8. So you need to specify an encoding when you open the file if it is not utf8.
with open('unicode.txt', encoding='
cp437 ') as f:
for line in f:
you can also use surrogateescape
with open(fname, 'r', encoding="ascii", errors="surrogateescape") as f:
data = f.read()
Please note that with recent versions of python utf8 is the default system encoding.