The troubles with pythonwin

Gerson Kurz moc.q-dnan-p at
Thu Aug 1 08:06:35 CEST 2002

First of, pythonwin is a great product. I use it in most of my python
problems. However, I keep having two rather severe problems with it,
and no, I'm not doing any GUI development from inside pw. 

1) Every now and then, pythonwin refuses to run the code I'm currently
editing with this msg:

Traceback (most recent call last):
line 298, in RunScript, __main__.__dict__, start_stepping=0)
line 60, in run
    _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
line 37, in _GetCurrentDebugger
    currentDebugger = debugger.Debugger()
line 433, in __init__
    lineNo = doc.MarkerGetNext(lineNo+1, MARKER_BREAKPOINT)
line 119, in MarkerGetNext
    return self.GetEditorView().SCIMarkerNext( lineNo-1, 1 << marker
AttributeError: SCIMarkerNext

When I close the file, and reopen it again (without leaving
pythonwin), the code will start just fine. 

2) Much *much* worse, every now and then pythonwin refuses to save my
changes with this message: 

>>> Traceback (most recent call last):
line 83, in OnSaveDocument
line 175, in _DocumentStateChanged
line 869, in UpdateDocumentLineStates
    doc.MarkerDeleteAll( MARKER_BREAKPOINT )
line 117, in MarkerDeleteAll
AttributeError: SCIMarkerDeleteAll
win32ui: OnSaveDocument() virtual handler (<bound method
SyntEditDocument.OnSaveDocument of
<pywin.framework.editor.color.coloreditor.SyntEditDocument instance at
0x010FB960>>) raised an exception

The really bad bad thing about this is: the error message is displayed
in the interactive window in the background, so you don't realize it
at first. You keep typing and every now and then save your message -
but it does NOT actually get saved, because pw just refuses to :(. So
by the time you finally realize that pw didn't save anything yet, you
can forget all your work - only a close and reopen will bring back pw
to a working state. That sucks. 

I've had this problem on at least three machines I work with (all
win2000, all using 

PythonWin 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on

Finally, I just saw this

win32ui: Error in Command Message handler for command ID 16004, Code 0

which, however, doesn't seem to do much harm. 

More information about the Python-list mailing list