The troubles with pythonwin
Gerson Kurz
moc.q-dnan-p at p-nand-q.com
Thu Aug 1 02:06:35 EDT 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):
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 298, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\debugger\__init__.py",
line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\debugger\__init__.py",
line 37, in _GetCurrentDebugger
currentDebugger = debugger.Debugger()
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py",
line 433, in __init__
lineNo = doc.MarkerGetNext(lineNo+1, MARKER_BREAKPOINT)
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\scintilla\document.py",
line 119, in MarkerGetNext
return self.GetEditorView().SCIMarkerNext( lineNo-1, 1 << marker
)+1
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):
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\framework\editor\document.py",
line 83, in OnSaveDocument
self._DocumentStateChanged()
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\framework\editor\document.py",
line 175, in _DocumentStateChanged
pywin.debugger.currentDebugger.UpdateDocumentLineStates(self)
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py",
line 869, in UpdateDocumentLineStates
doc.MarkerDeleteAll( MARKER_BREAKPOINT )
File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\scintilla\document.py",
line 117, in MarkerDeleteAll
self.GetEditorView().SCIMarkerDeleteAll(marker)
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
win32.
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