[issue14929] IDLE crashes on *Edit / Find in files ...* command

Terry J. Reedy report at bugs.python.org
Mon May 28 05:08:55 CEST 2012


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Interesting -- and nasty. I have used this successfully with both 3.2 and now 3.3 on Win7 to search idlelib/*.py files and on a directory of my own files, all written by Idle and been quite pleased with the speed.

I just tried searching /Lib/*.py for 'itertools' and quickly got 10 results (up to decimal.py) before Idle disappeared. OK, import idlelib/idle in console, repeat, and I get the same traceback up to

  File "C:\Programs\Python33\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1877: character maps to <undefined>

This is not a problem on 2.7.

Patch fixes problem, so I committed it so it will be in 3.3.0a4 (in a few days).

The default extension is .py. The default encoding for .py files is utf-8. I think that is the default for what Idle writes. So I think this should be the default encoding (explicitly given) at least for .py files.

----------
assignee:  -> terry.reedy
versions: +Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14929>
_______________________________________


More information about the Python-bugs-list mailing list