Community
    • 登入

    Python plugin works in NPP 7.7 but does work in NPP 7.8 upward

    已排程 已置頂 已鎖定 已移動 Notepad++ & Plugin Development
    24 貼文 2 Posters 3.8k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Stier HahnS
      Stier Hahn @Ekopalypse
      最後由 Stier Hahn 編輯

      @Ekopalypse you are doing great job , thank you !

      ps
      I came across a next roadblock , that’s more a pywin32 issue.

      See https://github.com/mhammond/pywin32/issues/1658

      May be you would have a hint how to troubleshoot that. as that seems to be sort of related to dependency lookup process.

      In a nutshell I’ve NPP plugin linked against boost::python which loads at startup some initialization python code. And it’s was working fine under py 3.7 and npp 7.7.

      Finally ( with your help) I managed to upgrade npp from 7.7 to 7.9
      and partially from winpython 3.7 to winpython 3.8.

      My NPP python plugin is loaded at startup, but execution of initialsation python scripts fails to import win32api.
      Embedded python wrapper is working fine ( I guess ) as import os / import sys and other simple code is working inside my plugin.

      I’m using win py 3.8 and latest pywin32 ( 300)

      Stier HahnS 1 條回覆 最後回覆 回覆 引用 0
      • Stier HahnS
        Stier Hahn @Stier Hahn
        最後由 編輯

        @Stier-Hahn pywin32 is installed sort of correctly as it works from python command line.

        EkopalypseE 1 條回覆 最後回覆 回覆 引用 0
        • EkopalypseE
          Ekopalypse @Stier Hahn
          最後由 編輯

          @Stier-Hahn

          there is an additional
          ...\AppData\Roaming\Python\Python38\site-packages
          path when used by the command line.
          Maybe give it a try to add it to your sys.path from embedded python.

          Do you know procmon?
          It could be used to see what npp and your plugin tries to load with a filter set to path contains whatever

          48b96c60-c947-48f4-9987-af19cf359c3d-image.png

          If importing pywin32 failed with unable to load dll
          then one of those
          2f2d6355-c2f6-4c2c-b92d-c49ef97d7714-image.png
          can not be found I guess.
          python38 shouldn’t be the problem but pywintypes38.dll might be in this additional path I’ve mentioned earlier??

          Stier HahnS 1 條回覆 最後回覆 回覆 引用 2
          • Stier HahnS
            Stier Hahn @Ekopalypse
            最後由 Stier Hahn 編輯

            @Ekopalypse cool, thanks for advice, turned out to be pywin32_system32 not being searched for some reason

            Untitled.png
            Apparently lookup path was (intentionally screwed up) modified

            I managed to fix my problem by placing pywintypes38.dll and pythoncom38.dll to NPP root

            1 條回覆 最後回覆 回覆 引用 2
            • 第一個貼文
              最後的貼文
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors