I've broken PythonWin2.4 - Dialogs don't pop up!

M

Michael

I have broken PythonWin and I don't know how or why. It worked great
until recently. I have installed / removed several apps since it worked
last. I could have a virus unknown to my antivirus program, I guess.
I'm stumped.


---------- The Symptoms ---------------------

Here's what happens. I fire up PythonWin without opening a python file.
Everything looks good - the interactive window is at the bottom of the
main dialog and I can type python code into it and it seems to work
fine. But if I select anything from the menu or toolbar that requires a
new dialog box to pop up, either:

1. Nothing happens - it acts like it popped up the dialog, but it's not
there. At least I can't see it.

2. I get an error down in the interactive window

3. I get a windows error telling me that the program is now going to
crash.

4. PythonWin just disappears off my screen - all the processes seem to
die.

Note: Sometimes I can't even get a menu item to respond, but that's not
very often.

--------- Examples -----------------

Example #1. If I select "Edit Python Path" I get the following message
in the interactive window:
from pywin.tools import regedit;regedit.EditRegistry()
Traceback (most recent call last):
File
"C:\Python24\Lib\site-packages\pythonwin\pywin\framework\toolmenu.py",
line 103, in HandleToolCommand
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File
"C:\Python24\Lib\site-packages\pythonwin\pywin\tools\regedit.py", line
323, in ?
template = RegTemplate()
File
"C:\Python24\Lib\site-packages\pythonwin\pywin\tools\regedit.py", line
245, in __init__
docview.DocTemplate.__init__(self, win32ui.IDR_PYTHONTYPE, None,
SplitterFrame, None)
File "C:\Python24\Lib\site-packages\pythonwin\pywin\mfc\docview.py",
line 71, in __init__
self._SetupSharedMenu_()
File "C:\Python24\Lib\site-packages\pythonwin\pywin\mfc\docview.py",
line 74, in _SetupSharedMenu_
sharedMenu = self.GetSharedMenu()
win32ui: The template has no menu


Example #2. If I try to open a file by selecting "open" from the "file"
menu or by hitting the icon on the toolbar, I almost always get the
behavior in which it acts like the File Open dialog box was displayed,
but it's not.

Example #3. If I hit the "?" icon on the toolbar, I get the following
error message:

File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\app.py",
line 307, in OnHelpAbout
win32ui.InitRichEdit()
win32ui: AfxInitRichEdit failed
win32ui: Error in Command Message handler for command ID 57664, Code 0

------------- Here's what I know --------------

My Machine:

+ I am on WinXP-Pro using Python 2.4:

+ In the interactive Window this is what is says: PythonWin 2.4 (#60,
Feb 9 2005, 19:03:27) [MSC v.1310 32 bit (Intel)] on win32.

+ The first item in my PATH env variable is: C:\Python24\.

+ From the PythonWin About box: Python 2.4 pywin32 extensions (build
203).

+ In my system registry, In HKEY_LOCAL_MACHINE\SOFTWARE\Python, I have
one entry: PythonCore and it has two sub-entries: 2.3 and 2.4.
Everything looks similar between the two and the registry data for
Python2.4 seems fine:

InstallPath = c:\Python24\
InstallGroup = ActiveState ActivePython2.4
PythonPath = C:\Python24\Lib;C:\Python24\DLLs;C:\Python24\Lib\lib-tk


The only dialog box that always correctly pops up is the About box from
the help menu.

I have Python 2.3 installed in an adjacent directory to my 2.4 version.
I can go down into the Python2.3 directories to PythonWin, which is
actually ver 2.3.4, and fire up PythonWin and I don't have any of these
problems.

After I have a problem with PythonWin2.4 I notice weird UI behavior
from my other apps until I kill PythonWin.


Any ideas?

Thanks,

~Michael.
 
N

Neil Hodgson

Michael Murdock:
I have broken PythonWin and I don't know how or why. It worked great
until recently. I have installed / removed several apps since it worked
last. I could have a virus unknown to my antivirus program, I guess.
I'm stumped.

You have tried rebooting? PythonWin can be upset by another non-
responding application. A simple thing to try is to remove and reinstall
in case you have modified one of the files in Pythonwin.

Neil
 
M

Michael

Rebooting does not help. I uninstalled and removed everything from
c:\python2.4 and then downloaded and installed the latest version.
Right after installing it, everything worked fine. But when I rebooted,
the problem came back. Sigh...

~Michael.
 
N

Neil Hodgson

Michael Murdock:
Rebooting does not help. I uninstalled and removed everything from
c:\python2.4 and then downloaded and installed the latest version.
Right after installing it, everything worked fine. But when I rebooted,
the problem came back.

Do you have a copy of win32ui.pyd on the system path?

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top