"Unknown exception" on startup with PythonScript Plugin



  • With the latest Notepad++ (7.4.2, 32-bits), I tried to install the Python Script plugin but failed: on startup I get an “unknown exception” dialog box on startup and Python Script does not appear in the plugin menu.

    I tried to install it 1) with the Plugin manager, 2) then manually after downloading the zip from here, and 3) then with the msi from there.

    I’ve uninstalled NPP several times and tried again, no luck. What can I do? (My OS is Win7 pro, 64-bits). Thank you!



  • @gracile-fr

    Could you post your debug-info?
    Npp has been installed or is a portable version?

    Cheers
    Claudia



  • It has been installed. How can I get the debug-info?



  • @gracile-fr

    menu ? -> Debug Info

    Cheers
    Claudia



  • Thank you.
    Debug info is pretty limited, but PythonScript doesn’t appear (though it does appear under the “Installed” tab of the Plugin Manager).

    Notepad++ v7.4.2 (32-bit)
    Build time : Jun 18 2017 - 23:34:19
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Admin mode : OFF
    Local Conf mode : OFF
    OS : Windows 7 (64-bit)
    Plugins : mimeTools.dll NppConverter.dll NppExport.dll PluginManager.dll



  • @gracile-fr

    Is there a file called PythonScriptStartup.cnf in your %appdata%\notepad++\plugins\Config directory? If so, what is the content of that file?
    If not, how does the directory look like?

    In C:\Program Files (x86)\Notepad++, do you see a python27.dll ?
    If yes, what is it size?

    Under C:\Program Files (x86)\Notepad++\plugins there should be the PythonScript.dll.
    What is its size?

    In the C:\Program Files (x86)\Notepad++\plugins\PythonScript directory, there
    should be a lib and scripts directory.
    The lib holds all the embedded python modules,
    the scripts should have one startup.py (the machine one) and
    a sample directory.

    Can you check this?

    Cheers
    Claudia



  • Is there a file called PythonScriptStartup.cnf in your %appdata%\notepad++\plugins\Config directory? If so, what is the content of that file?

    Yes. The content is ITEM/

    In C:\Program Files (x86)\Notepad++, do you see a python27.dll ?
    If yes, what is it size?

    python27.dll is there: 2637 ko

    Under C:\Program Files (x86)\Notepad++\plugins there should be the PythonScript.dll.
    What is its size?

    PythonScript.dll is in \plugins: 1309 ko

    In the C:\Program Files (x86)\Notepad++\plugins\PythonScript directory, there
    should be a lib and scripts directory.
    The lib holds all the embedded python modules,
    the scripts should have one startup.py (the machine one) and
    a sample directory.

    Indeed…!



  • @gracile-fr

    ok, it looks like (at least on my ubuntu installation) the unknown exception error happens if access to the
    …\plugins\PythonScript\lib directory or files within this directory isn’t possible.

    If you still have the zipped verison I would first try to unpack the lib into the …\plugins\PythonScript\ directory.
    If this doesn’t solve the issue, then I would suggest to

    1. uninstall PythonScript via Plugin Manager
    2. uninstall PythonScript via Windows Software remove (because you stated you installed via msi as well)
    3. remove everything within …\plugins\PythonScript\ and the directory itself
    4. backup your data from %appdata%\notepad++\plugins\Config\PythonScript
    5. remove %appdata%\notepad++\plugins\Config\PythonScript
    6. double check that python27.dll has been removed from C:\Program Files (x86)\Notepad++
    7. stop npp
    8. Install from msi package and cross the fingers
    9. restart npp

    Cheers
    Claudia



  • Thank you very much!!
    It’s working now. The two things that I had not tried before are steps 2 and 5. I think that makes the difference. I also rebooted my computer before step 8.

    Thanks again Claudia!


Log in to reply