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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael

    #1

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

    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:
    [color=blue][color=green][color=darkred]
    >>> Failed to execute command:[/color][/color][/color]
    from pywin.tools import regedit;regedit .EditRegistry()
    Traceback (most recent call last):
    File
    "C:\Python24\Li b\site-packages\python win\pywin\frame work\toolmenu.p y",
    line 103, in HandleToolComma nd
    exec "%s\n" % pyCmd
    File "<string>", line 1, in ?
    File
    "C:\Python24\Li b\site-packages\python win\pywin\tools \regedit.py", line
    323, in ?
    template = RegTemplate()
    File
    "C:\Python24\Li b\site-packages\python win\pywin\tools \regedit.py", line
    245, in __init__
    docview.DocTemp late.__init__(s elf, win32ui.IDR_PYT HONTYPE, None,
    SplitterFrame, None)
    File "C:\Python24\Li b\site-packages\python win\pywin\mfc\d ocview.py",
    line 71, in __init__
    self._SetupShar edMenu_()
    File "C:\Python24\Li b\site-packages\python win\pywin\mfc\d ocview.py",
    line 74, in _SetupSharedMen u_
    sharedMenu = self.GetSharedM enu()
    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\Li b\site-packages\python win\pywin\frame work\app.py",
    line 307, in OnHelpAbout
    win32ui.InitRic hEdit()
    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_MACH INE\SOFTWARE\Py thon, 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\DL Ls;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.

  • Neil Hodgson

    #2
    Re: I've broken PythonWin2.4 - Dialogs don't pop up!

    Michael Murdock:
    [color=blue]
    > 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.[/color]

    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

    Comment

    • Michael

      #3
      Re: I've broken PythonWin2.4 - Dialogs don't pop up!

      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.

      Comment

      • Neil Hodgson

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

        Michael Murdock:
        [color=blue]
        > 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.[/color]

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

        Neil

        Comment

        Working...