[python-win32] Problem with Check: can't decode byte 0x90

bob gailer bgailer at gmail.com
Mon Mar 31 04:06:07 CEST 2014


On 3/30/2014 10:31 AM, Roger Upole wrote:
> Should be able to open the file in binary mode (as RunScript above it does)
> and append the \n as bytes.
Are you asking me to modify the code that is behind File->Check 
(Ctrl+Shift+C)? That is part of the pywin distribution!

If I modify the read in that code I assume something else will break.

I will file a bug report.
> "bob gailer" <bgailer at gmail.com> wrote in message news:53373D8F.8050901 at gmail.com...
>> My program loads into an edit window and runs fine.
>>
>> Top line :  # -*- coding: utf-8 -*-
>>
>> However when I invoke check (shift-ctl-c) I get:
>> Traceback (most recent call last):
>>    File "C:\Python33\Lib\site-packages\pythonwin\pywin\framework\intpyapp.py", line 335, in OnFileCheck
>>      scriptutils.CheckFile()
>>    File "C:\Python33\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 467, in CheckFile
>>      code = f.read() + "\n"
>>    File "C:\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 0x90 in position 19689: character maps to <undefined>


More information about the python-win32 mailing list