[python-win32] pythonwin 204 editor crash
Robin Becker
robin at reportlab.com
Wed May 3 11:32:45 CEST 2006
I see the error below when trying to edit this file
-------------------------------------------------
_flightClass = {'first':['A','F','G','P'],
'business':['C','D','I','J','Z'],
'economy':['B','E','H','K']
}
class ItemMapping(dict):
def __setattr__(self, name, value):
self[name] = value
def __getattr__(self, name):
return self[name]
-------------------------------------------------
If I put a comment before _flightClass or change the spacing so it looks better eg
-------------------------------------------------
_flightClass = {
'first':['A','F','G','P'],
'business':['C','D','I','J','Z'],
'economy':['B','E','H','K']
}
class ItemMapping(dict):
def __setattr__(self, name, value):
self[name] = value
def __getattr__(self, name):
return self[name]
-------------------------------------------------
the crash doesn't happen.
PythonWin 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32.
Portions Copyright 1994-2004 Mark Hammond (mhammond at skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> Traceback (most recent call last):
File
"C:\Python\Lib\site-packages\pythonwin\pywin\framework\editor\color\coloreditor.py",
line 51, in OnInitialUpdate
SyntEditViewParent.OnInitialUpdate(self)
File "C:\Python\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line
210, in OnInitialUpdate
self.OnWinIniChange(None)
File "C:\Python\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line
223, in OnWinIniChange
self.DoConfigChange()
File
"C:\Python\Lib\site-packages\pythonwin\pywin\framework\editor\color\coloreditor.py",
line 162, in DoConfigChange
ext.set_indentation_params(1)
File "C:\Python\Lib\site-packages\pythonwin\pywin\idle\AutoIndent.py", line
140, in set_indentation_params
i = self.guess_indent()
File "C:\Python\Lib\site-packages\pythonwin\pywin\idle\AutoIndent.py", line
473, in guess_indent
opener, indented = IndentSearcher(self.text, self.tabwidth).run()
File "C:\Python\Lib\site-packages\pythonwin\pywin\idle\AutoIndent.py", line
546, in run
_tokenize.tokenize(self.readline, self.tokeneater)
File "c:\python\lib\tokenize.py", line 153, in tokenize
tokenize_loop(readline, tokeneater)
File "c:\python\lib\tokenize.py", line 159, in tokenize_loop
for token_info in generate_tokens(readline):
File "c:\python\lib\tokenize.py", line 229, in generate_tokens
raise IndentationError(
IndentationError: unindent does not match any outer indentation level
win32ui: OnInitialUpdate() virtual handler (<bound method
SyntEditView.OnInitialUpdate of
<pywin.framework.editor.color.coloreditor.SyntEditView instance at 0x012A5238>>)
raised an exception
Traceback (most recent call last):
File
"C:\Python\Lib\site-packages\pythonwin\pywin\framework\editor\color\coloreditor.py",
line 51, in OnInitialUpdate
SyntEditViewParent.OnInitialUpdate(self)
File "C:\Python\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line
210, in OnInitialUpdate
self.OnWinIniChange(None)
File "C:\Python\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line
223, in OnWinIniChange
self.DoConfigChange()
File
"C:\Python\Lib\site-packages\pythonwin\pywin\framework\editor\color\coloreditor.py",
line 162, in DoConfigChange
ext.set_indentation_params(1)
File "C:\Python\Lib\site-packages\pythonwin\pywin\idle\AutoIndent.py", line
140, in set_indentation_params
i = self.guess_indent()
File "C:\Python\Lib\site-packages\pythonwin\pywin\idle\AutoIndent.py", line
473, in guess_indent
opener, indented = IndentSearcher(self.text, self.tabwidth).run()
File "C:\Python\Lib\site-packages\pythonwin\pywin\idle\AutoIndent.py", line
546, in run
_tokenize.tokenize(self.readline, self.tokeneater)
File "c:\python\lib\tokenize.py", line 153, in tokenize
tokenize_loop(readline, tokeneater)
File "c:\python\lib\tokenize.py", line 159, in tokenize_loop
for token_info in generate_tokens(readline):
File "c:\python\lib\tokenize.py", line 229, in generate_tokens
raise IndentationError(
IndentationError: unindent does not match any outer indentation level
win32ui: OnInitialUpdate() virtual handler (<bound method
SyntEditView.OnInitialUpdate of
<pywin.framework.editor.color.coloreditor.SyntEditView instance at 0x012A59E0>>)
raised an exception
--
Robin Becker
More information about the Python-win32
mailing list